OOXMLPrettyPrint: Populate the standalone-attribute always to avoid differences in the resulting XML files from Excel and POI
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1689794 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
090b86cb71
commit
0f24b7532c
@ -108,6 +108,7 @@ public class OOXMLPrettyPrint {
|
|||||||
try {
|
try {
|
||||||
if(name.endsWith(".xml") || name.endsWith(".rels")) {
|
if(name.endsWith(".xml") || name.endsWith(".rels")) {
|
||||||
Document document = documentBuilder.parse(new InputSource(file.getInputStream(entry)));
|
Document document = documentBuilder.parse(new InputSource(file.getInputStream(entry)));
|
||||||
|
document.setXmlStandalone(true);
|
||||||
pretty(document, out, 2);
|
pretty(document, out, 2);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Not pretty-printing non-XML file " + name);
|
System.out.println("Not pretty-printing non-XML file " + name);
|
||||||
|
Loading…
Reference in New Issue
Block a user