标签:style blog color io for 文件 sp div c
1 protected void writeElementToFile(Element valrespEle) { 2 3 try { 4 TransformerFactory transformerFactory = TransformerFactory.newInstance(); 5 Transformer transformer = transformerFactory.newTransformer(); 6 transformer.transform(new DOMSource(valrespEle), new StreamResult(System.out));
//写入文件,new StreamResult("src/test.xml")
7 } catch (Exception e) {
8 }
9 }
标签:style blog color io for 文件 sp div c
原文地址:http://www.cnblogs.com/asnjudy/p/4010888.html