Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] no conversion of entity number required

Jason Hunter

2007-07-18

Replies:

JDOM internally stores the *semantic* value of the XML not the
incidental serialized form it had before ingestion. That said, you can
with the outputter (via the Format class) plug in an EscapeStrategy that
dictates which characters to escape as character entities. It escapes
using the char's hex numeric value.

You could also just use the Format class to adjust the output encoding
to "US-ASCII" and then it'll escape all chars that aren't under 128.

-jh-

Franck Glaser wrote:
> Good morning
>
> to feed an other software
> I have to process an xml
> including entity numbers.
>
> As usual
> saxbuilder is used to read the xml file
> and jdom to manipulate the xml.
> the output file is produced by XMLOutputter
>
> input file for instance includes:
> ?
>
> in the output file:
> ? has been replaced by capital a, grave accent
>
> if there a way to forbid the conversion
> of entity number ?
>
> thank you for your time
>
>
>  
>
>  
>    
> ___________________________________________________________________________
> D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions !
> Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses
> http://fr.answers.yahoo.com
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.