Document 按照xml格式输出
时间:2014-06-22 12:27:02
收藏:0
阅读:192
private void GetXMLDocument(Document doc) { OutputFormat format1 = new OutputFormat(" ", true); format1.setEncoding("UTF-8"); XMLWriter out1=new XMLWriter(new PrintWriter(System.out),format1); try { out1.write(doc); out1.flush(); } catch (IOException e) { e.printStackTrace(); } }
评论(0)