[jdom-interest] Question about turning off escaping & characters..

Jason Hunter jhunter at acm.org
Thu Dec 6 12:45:32 PST 2001

The best way to solve this is to set the text in the document as the
exact string you want without the escaping.  Here for example just set
\u0151 in the string when it's set.  Then when someone calls getText()
they'll get the right string, and the outputter will handle it correctly
too.  Do not set the text in an escaped form.

You can control the outputter escaping behavior through subclassing. 
You'll only need to do that here if you want the char written as —
instead of the default UTF-8 encoded char.


"Pugh, Eric" wrote:
> Hi,
> In my application, some of my test descriptions have & characters in them,
> for instance, "Set the tempo and call the tune—you control every.."
> The — is to product a long dash (an em dash?).   However, when it use
> the XMLOutputter to create my XML document, it see's the & character and
> changes it to —.  Out partner who reads in the XML can't parse this
> properly.
> How can I turn off this escaping behavior?  The encoding type is ISO-8859-1.
> Eric Pugh
> _______________________________________________
> 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