[jdom-interest] CDATA inconsistency

Duane Morin dmorin at morinfamily.com
Sat Nov 2 09:45:08 PST 2002


At 11:47 AM 11/2/2002 -0500, bob mcwhirter wrote:
>I would like to take this opportunity to remind everyone that MIME exists
>for a reason.  When all you have a is a hammer (XML) everything looks like
>a thumb (stuffing random binary in XML).

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.  I agree completely that I should never have 
tried to put it into XML in the first place. The program I wrote is just 
taking existing text and trying to stuff it into an Element, and I hadn't 
considered international characters.  I thought that if the CDATA 
constructor threw an exception or something, or otherwise told me that I 
had invalid data, then I could catch it and act accordingly before writing 
it out.  Otherwise I have to test everything before putting it into the 
Element, even though maybe 1% or less of my data will fit this condition.

Duane



>         -bob
>
>_______________________________________________
>To control your jdom-interest membership:
>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com




More information about the jdom-interest mailing list