How to properly read a CDATA section in java using SAX parser

673 views Asked by At

I have a XML in the following format.

<student>
   <class>&lt;![CDATA[4B]]&gt;</class>
</student>

I am parsing this XML with SAX parser.

While parsing I am getting the output as:

class:>[CDATA[4B]]<

How can I handle the < adn > in SAX. Is there any way of converting them to < and > before giving it to the parser or can we handle them using SAX only?

0

There are 0 answers