[jdom-interest] Special characters in XML?
scott.willy at avisto.com
Fri Mar 16 20:59:47 PST 2001
Thanks for the heads-up. We are using JDOM B5, so I will look at code in B6
(or in CVS if its not here).
I guess if I continue to use Attributes with 'invalid' chars, then I will
have to have a private encoding (not good).
I was thinking that even if I use a CDATA in a Element, I would still need a
private encoding for 'invalid' XML chars. So I may as well keep using
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Jason Hunter
> Sent: 16 March 2001 21:58
> To: Scott Willy
> Cc: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] Special characters in XML?
> > Not completely. The the XMLOutputter will only escape chars
> that mess-up the
> > XML parsing. It does not encode the chars which are 'invalid' for an XML
> > document.
> JDOM actually enforces at construction time that no invalid chars are
> present in the document.
> > For example, if you set an attribute to have text with chars
> with values <
> > x020 then there is no encoding and when you reparse the file,
> your XML parse
> > will puke-up.
> It never would get to the outputter. The Attribute constructor would
> have thrown an exception on construction with those illegal chars. You
> may not have witnessed this because all char checks aren't yet
> implemented and the Attribute check is relatively new.
> To control your jdom-interest membership:
dr at yourhost.com
More information about the jdom-interest