【发布时间】:2015-04-14 07:17:31
【问题描述】:
这会在控制台上打印出我的 xml 文档,并带有漂亮的打印效果。
//writing output to a file
Document writeDocument = new Document(document);
//Formatting the file
Serializer serializer = new Serializer(System.out, "UTF-8");
serializer.setIndent(4);
serializer.write(writeDocument);
我需要返回相同的xml文档,以便在浏览器中显示。
【问题讨论】: