we are sending XML that consists of CDATA sections. Issue I am facing parser is generating nested CDATA sections for each newline feed it encountered within CDATA sections. FYR, I am attching CDATA input and CDATA as parsed by parser.
CDATA as parsed by parser =========================== <xmlData><![CDATA[<?xml version="1.0"?> ]]><![CDATA[ <form> ]]><![CDATA[ <type>UNKNOWN</type> ]]><![CDATA[ <code>1234</code> ]]><![CDATA[ </form>]]> </xmlData>
Joined: Feb 02, 2006
For the parser to distinguish between non-ignorable and ignorable whitespace, there must be a DTD or schema associated with the XML document, and it must be used to validate the document during parsing.
void setCoalescing(boolean value) - If set, the parser combines all adjacent Text nodes and CDATA section nodes into a single Text node in the Document tree. If not set, CDATA sections may appear as separate nodes in the tree.