创建xml时,设置xml编码问题
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("GBK");
XMLWriter output = new XMLWriter(new FileWriter(new File("c:/catalog.xml")),format);
output.write(document);
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("GBK");
XMLWriter output = new XMLWriter(new FileWriter(new File("c:/catalog.xml")),format);
output.write(document);