-
Sub-task
-
Resolution: Delivered
-
P4
-
9
-
Verified
The JAXP library through the `Transformer` and `LSSerializer` supports a pretty print feature that can format the output by adding whitespaces and newlines to produce a more readable form of an XML document. As of the JDK 9 release, this feature has been enhanced to generate a format similar to that of the major web browsers. In addition, the `xml:space` attribute as defined in the XML specification (https://www.w3.org/TR/2006/REC-xml-20060816/#sec-white-space) is now supported.
The `Pretty-Print` feature does not define the actual format. The output format can change over time or vary from implementation to implementation, and therefore should not be relied on for exact text comparison. It is recommended that such applications turn off the `Pretty-Print` feature and perform an XML to XML comparison.
The `Pretty-Print` feature does not define the actual format. The output format can change over time or vary from implementation to implementation, and therefore should not be relied on for exact text comparison. It is recommended that such applications turn off the `Pretty-Print` feature and perform an XML to XML comparison.
- relates to
-
JDK-8250879 Create XML File - no indentation - one long row
-
- Closed
-