java - turn off unescaping in SAXParser -
i using saxparser in java.
is there way turn off unescaping while parsing xml using saxparser?
for example have following xml:
<tag> „title” </tag>
i obtain characters(char[] ch, int start, int length) message „title”
but handler unescapes content of xml , gives: „title”
i tried specifying custom entityresolver, seems resolveentity() method never gets called.
the saxparser doing supposed if want preserve text node as-is need wrap in cdata section. can either preprocess step or perhaps there way wrapping while parsing (but don't know how).
Comments
Post a Comment