[jdom-interest] CDATA inconsistency

Jason Hunter jhunter at servlets.com
Mon Nov 4 00:33:24 PST 2002


Duane Morin wrote:
> 
> In  my defense, the original question wasn't "What's a way to get around
> this?" but rather on the apparent inconsistency in the fact that I could
> create the CDATA object, write it out, but then when I tried to read it
> back in, I got IllegalData.  

The Verifier class has static methods to check JDOM input.  The CDATA
text is checked with Verifier.checkCDATASection().  If you think you
were able to pass in illegal chars without it noticing, identify which
chars and let us know.  Otherwise the more likely problem is related to
encoding where perhaps your output and input encodings don't match, thus
creating problem characters out of the corrupted data.

-jh-



More information about the jdom-interest mailing list