--用标准的方式对xml进行格式化
XmlOptions xmlOptions = new XmlOptions();
xmlOptions.setSavePrettyPrint();
xmlOptions.setUseDefaultNamespace();
File xmlFile = new File(文件路径+文件名称);
document.save(xmlFile, xmlOptions);
此便可以做成标准的xml文件。
--用标准的方式对xml进行格式化
XmlOptions xmlOptions = new XmlOptions();
xmlOptions.setSavePrettyPrint();
xmlOptions.setUseDefaultNamespace();
File xmlFile = new File(文件路径+文件名称);
document.save(xmlFile, xmlOptions);
此便可以做成标准的xml文件。