Java Mailing List Archive

http://www.junlu.com/

Home » JDOM Projects »

[jdom-interest] XML 1.1 -- Please stab me with a dull knife and
 trample my dead body

Wilfried Middleton

2012-09-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi All,

I just learned that in order to safely use JDOM2, I will need to sanitize my Element .setText(string) so that the parsed data does not contain verboten characters under the XML 1.1 spec.

I have an ascii processor and it needs to be able to use xml as a document format. Unfortunately, not all ascii is allowed in an Element text.

Stab me with a dull knife and trample my dead body. But ..... please please please don't make me sanitize all my data before putting it into XML Elements.

1) It makes my programming task much more cumbersome because I must ensure not to feed any of the new verboten and doomed ascii/UTF-8 characters to store as xml text.

2) No one uses xml 1.1, do they?

3) It slows down the parsing (a very small amount) with all the element text checking.

Now that JDOM2 is xml 1.1 compatible, is there any turning back. Can this be undone? 

Does everyone understand that their software will bust if data provided as text is not adhering to the new standard?

What about you? How do you deal with it when using the libraries?

Wilf
_______________________________________________
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.