Preserving the CDATA format with a SAX parser

cypher

New Member
I'm trying to parse an XML file and insert some attributes in my database. I'm developing in JAVA and using SAX to parse the XML file.My problem is that when I read an attribute in CDATA format I only get what the CDATA contains. Perhaps I wan't to keep the CDATA format?For example with the XML below : \[code\] <?xml version="1.0" encoding="UTF-8"?> <Bank> <Account type="saving"> <Id>1001</Id> <Name><![CDATA[<Jack> <Robinson>]]></Name> <Amt>10000</Amt> </Account> <Account type="current"> <Id>1002</Id> <Name>Sony Corporation</Name> <Amt>1000000</Amt> </Account> </Bank>\[/code\]I would like to get the \[code\]Name\[/code\] and have it like this \[code\]<![CDATA[<Jack> <Robinson>]]>\[/code\] and not only \[code\]<Jack> <Robinson>\[/code\] which is what I am getting.Can anyone help me with this issue please. PS : Sorry for my English, I'm french.Best regards,
 
Back
Top