En Tue, 18 Apr 2006 09:55:27 -0700, Henri Yandell <[EMAIL PROTECTED]> escribió:
On 3/31/06, David López Muñoz <[EMAIL PROTECTED]> wrote:
Hello,
I'm trying to escape some texts to be xml-valid and I'm using
StringEscapeUtils.escapeXml().
I found a problem with low characteres such as #18. They don't seem to be
escaped, and therefore they are mixed together with other characteres as if
there were normal characteres such as 'a', '1' etc.
Am I doing sth wrong? I'm using commons-lang 2.1. Is it a known bug already
solved in newer versions?
Sorry for lack of reply. Definitely not fixed yet, and thanks for
reporting it in bugzilla. There's another bug that complains that high
characters ARE getting escaped - so definitely something that's up for
debate :)
Would all low-chars want to be escaped? I suspect that people wouldn't
want newlines suddenly being escaped and turning the xml into a single
line. Anyone got any idea if the XML spec even talks about low-chars?
Hen
Thanks Hen,
According to my experience, low characteres MUST be escaped, since I'm having
problems with an XML document partly generated with escapeXml().
The document is generated in order to be read by some other client that
is using xerces. This document is filled in with some fields extracted from our
DB.
Unfortunately some of the fields happened to contain some unrequired characters
such as &x18, etc. That would not be a problem, but the resulting document
makes xerces crash. I therefore assume that this is not a valid character
and have to be escaped.
--
David López Muñoz
(34) 91 337 4703
msn: [EMAIL PROTECTED]
Multimedia Technology
Telefónica Investigación y Desarrollo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]