Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8087303 LSSerializer pretty print does not work anymore. regression?
  3. JDK-8175793

Release Note: Revamping the pretty print feature for Transformer and LSSerializer

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P4 P4
    • 9
    • 9
    • xml
    • 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.

            fyuan Frank Yuan (Inactive)
            joehw Joe Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: