[jdom-interest] Need to optionally cancel automatic escaping

Lucio,Daniel lucio at adp.uchc.edu
Fri Jul 11 12:54:48 PDT 2003


Hi everyone!

I know that this is not the first time that someone comes up with the problems risen with the automatic escaping feature in JDOM. The reason why I support the idea of been able to disable this feature of JDOM programatically (like a boolean flag or a property), is because we are having problems to read back and write in the linefeeds and carriage returns from our documents.
Because of specific reasons in our needs, we can the characters '\n' or '\r' can appear as part of the content of elements or values of attributes.
But I found out that this characters:
- in the value of an attribute are transformed into spaces
- and if you have a combination like "....\n\r\n..." as content text, the '\r' is lost when I read it back.

I am using JDOM beta 9, and already tried different XML parsers like Aelfred, Crimson and Xerces with no success.
Ideally, if I can escape '\n' for a "
" and '\r' for a "&#13" everything would work perfectly. But, because the way things are right now, you know that this will double escaped in my output documents, getting weird things like: "...
..."

Any input on how to overcome this will be welcome!


Daniel.


Pd, I would appreciate if someone could tell me instead, if there will be a patch available soon. =D



More information about the jdom-interest mailing list