[jdom-interest] XMLOutputter insers blank xmlns=""
Lxu at copyright.com
Tue Jul 23 11:10:20 PDT 2002
Can someone tell me what I'm doing wrong here?
I have an Element object that looks like:
Then I added namespace stuff to <level1> using addNamespaceDeclaration() etc. So it becomes:
<level1 xmlns="http://my.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://my.com http://127.0.0.1/test.xsd">
Then I constructed a Document object using this element as root. When I use XMLOutputter.outputString(dom), it's giving me <level2> as:
I can see that the string output for <level1> and <level3> are exactly as I wanted. So why it is trying to set an empty namespace for <level2>?
Thanks a lot!
More information about the jdom-interest