Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Version 2
-
None
-
None
-
Windows XP Professional
Description
/**
- When parsing a string containing CDATA into an XmlObject with the
- setLoadStripWhitespace() option, the leading white spaces of the CDATA string are
- preserved as expected, but the trailing white spaces still get stripped off.
*/
import org.apache.xmlbeans.*;
public class StripWhiteSpaceWithCDATATest {
public static void main(String[] args) {
String stringValue = new String("<test><name>testXmlBean</name>" +
"<message><![CDATA[\n Hello, World \n]]></message></test>");
try
catch(XmlException e)
{ e.printStackTrace(); } }
// Results:
//
// XmlObject WITH strip whitespace option:
// <test><name>testXmlBean</name><message>
// Hello, World</message></test>
//
// XmlObject WITHOUT strip whitespace option:
// <test><name>testXmlBean</name><message>
// Hello, World
// </message></test>
//
}
Attachments
Issue Links
- is duplicated by
-
XMLBEANS-524 Bug with setLoadStripWhitespace ? Or expected behaviour?
- Closed