castor
  1. castor
  2. CASTOR-1593

AnyNode unmarshalling not preserving whitespaces

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.0.4
    • Component/s: XML
    • Labels:
      None
    • Environment:
      Windows XP SP2, Eclipse 3.2, JDK 1.5.0_07
    • Testcase included:
      yes
    • Number of attachments :
      4

      Description

      When marshalling a structure that contains an AnyNode element with pure whitespaces as text content the XML structure is serialized correctly with the whitespaces, however, once I unmarshall the same structure the whitespaces of the AnyNode element are not preserved.

      I tried the following settings to change this behaviour:

      • unmarshaller.setWhitespacePreserve(true);
      • Using DTD with attribute declaration xml:space="preserve"
      • Setting node attribute xml:space="preserve" directly

      For normal String elements these settings work as expected, but for an AnyNode element they don' have any influence.

      1. patch.c1593.20060930.txt
        12 kB
        Werner Guttmann
      2. TextContentTest.java
        6 kB
        M.-Leander Reimer

        Activity

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            M.-Leander Reimer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: