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

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: xml
    • Subcomponent:
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: