Details
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.
JUnit test case, mapping file, test entity, DTD file and README.
The testcase contains 3 tests. Using version 1.0.3 two tests should fail at the assertEquals of the AnyNode after unmarshalling.