Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
Version 1
-
None
-
None
-
Java 1.4.2_03, Win 2K
Description
When called with XmlOptions.SAVE_PRETTY_PRINT, xmlText trims whitespace within an element - e.g., ' a ' is converted to 'a'.
Unless I'm completely missing something, the formatter shouldn't ever change the contents of an element.
The following test snippet reveals the problem:
XmlObject xdoc = XmlObject.Factory.parse("<test> </test>");
Assert.assertEquals("<test> </test>", xdoc.xmlText());
Assert.assertEquals("<test> </test>" + newLine, xdoc.toString());
The current build from CVS returns <test/>[newline] instead of <test> <test>[newline].
Complete testcase and patch to follow.
Attachments
Attachments
Issue Links
- relates to
-
XMLBEANS-540 Prevent trim of elements when pretty print is used
- Resolved