[jdom-interest] How do you do it in JDOM?

Chris B. chris at tech.com.au
Tue Feb 17 04:58:29 PST 2004

Ok, so I override createParser() in SAXBuilder so that I can use my own 
custom XMLReader.

The trouble is, my XML reader creates XML elements that contain the 
attribute xml:space="preserve".

And I get the error....

ER org.jdom.IllegalNameException: The name "xml" is not legal for 
JDOM/XML Namespace prefixs: Namespace prefixes cannot begin with "xml" 
in any combination of case.
ER     at org.jdom.Namespace.getNamespace(Namespace.java:154)
ER     at org.jdom.input.SAXHandler.startElement(SAXHandler.java:511)

Should this be regarded as a bug in JDOM?

More information about the jdom-interest mailing list