XML 1.1 -- Please stab me with a dull knife and trample my dead body

Canadian Wilf <[email protected]> Thu, 6 Sep 2012 21:52:37 -0700
Newsgroups gmane.comp.java.jdom.general
Message-ID <CAL8g3UToFiRyxuT4rPkcWxi_J3YpTFn6AzGM6ZPTJej0+_EYOw@mail.gmail.com>
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/[email protected]