[jdom-interest] Question about turning off escaping & characters..
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:
> 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 &#151;. Out partner who reads in the XML can't parse this
> How can I turn off this escaping behavior? The encoding type is ISO-8859-1.
> Eric Pugh
> To control your jdom-interest membership:
More information about the jdom-interest