專題用的工作日誌 – 使用java中的DOM來抓取資料庫資料產生xml,套上xslt產生HTML(含編碼問題)
DocumentBuilder builder = factory.newDocumentBuilder();
Document document=builder.newDocument();
//根
Element root=(Element)document.createElement(“overview");
//元素1
Element child1=document.createElement(“Search_information");
//元素2
Element child1_1=document.createElement(“Search_tag");
child1_1.appendChild(document.createTextNode(“測試tag"));
//root.appendChild(child2);