From 13d04a13194ec47ba673865189f5a7d2f43382c0 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 8 Jul 2015 05:57:32 +0000 Subject: [PATCH] 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 --- src/ooxml/java/org/apache/poi/dev/OOXMLPrettyPrint.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ooxml/java/org/apache/poi/dev/OOXMLPrettyPrint.java b/src/ooxml/java/org/apache/poi/dev/OOXMLPrettyPrint.java index 97e16f7589..a05af6b4d8 100644 --- a/src/ooxml/java/org/apache/poi/dev/OOXMLPrettyPrint.java +++ b/src/ooxml/java/org/apache/poi/dev/OOXMLPrettyPrint.java @@ -108,6 +108,7 @@ public class OOXMLPrettyPrint { try { if(name.endsWith(".xml") || name.endsWith(".rels")) { Document document = documentBuilder.parse(new InputSource(file.getInputStream(entry))); + document.setXmlStandalone(true); pretty(document, out, 2); } else { System.out.println("Not pretty-printing non-XML file " + name);