[jdom-interest] Namespace help

Li Xu Lxu at copyright.com
Wed Jul 24 14:43:04 PDT 2002


Thanks for all the clarification. I'm not sure if I stated my problem clearly. I understand that if I want a namespace with an element, I need to put it there. But in this case, I did not want any and didn't put any in those 2nd level elements. So why is Outputter still printing out xmlns=""? I didn't assign "" namespace to those elements.

To illustrate, (<level2> has no namespace set) I want the output to be :

===============
<root_elem xmlns="http://my.com" ....>
	<level2>
		<level3>xyz</level3>
	</level2>
</root_elem>
===============

but XMLOutputter is giving this:

===============
===============
<root_elem xmlns="http://my.com" ....>
	<level2 xmlns="">
		<level3>xyz</level3>
	</level2>
</root_elem>
===============

Notice <level3> is perfectly fine without any namespace? Please tell me what I'm missing here.

Thank you!
 



More information about the jdom-interest mailing list