XStream
  1. XStream
  2. XSTR-734

Inconsistency with use of StaxDriver (XML includes header and is not pretty-printed)

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4.4
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • JDK version and platform:
      All

      Description

      As discussed with Jörg on the mailing list. Although the Javadoc and FAQ say that toXML will give pretty-printed XML 'snippets' (no header), this only occurs if not using the StaxDriver. There are 3 possible solution types:

      a) Update Javadoc and FAQ to make clear that the header presence and pretty-printing is driver-dependent (and put info. about the header in the Javadoc).

      b) Provide non-backwards-compatibility-breaking code to allow an 'XStream contract consistent' version of the StaX driver to be used (e.g., a separate driver class StaxContractConsistentDriver).

      c) Fix the API 'properly' so that XStream always returns pretty-printed snippets, irrespective of the driver used. This might need to be a major release change since it could break code for users assuming the header existence when using StaxDriver.

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Stuart Rossiter
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated: