Hi,
Can someone tell me what I'm doing wrong here?
I have an Element object that looks like:
=====
<level1>
<leve2>
<level3/>
</level2>
</level1>
=====
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.comhttp://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:
=====
<level2 xmlns="">
=====
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!