[jdom-interest] (no subject)

Thomas Enzi Thomas.Enzi at wu-wien.ac.at
Mon Dec 3 08:56:41 PST 2001


Hello,

I`ve a problem with SAXParser and it would be really nice, if someone could help me.
I am parsing an XML-Instance using the JDOM SAXBuilder.

Instance:

<univ:tag xmlns:univ="http://someurl#" >
     <innertag univ:id="someid"/>
</univ:tag>

When printing it (with XMLOutputter) I get the following result:

 ?xml version="1.0" encoding="UTF-8"?>
<univ:tag xmlns:univ="http:/someurl#">
	<innertag id="someid" />
</univ:tag>

so the attribute "id" from "innertag" does not have a ns-prefix, but I need it.
The same happens when walking through this instance and accessing the 
Attribute (using class Attribute). There also attribute.getNamespace or getNSPrefix
does not provide the prefix.

I found out that this happens to all attributes that have the namespace-prefix that is used
in the first parent of an instance.

What can I do to avoid it?

best Regards

Thomas

<><><><><><><><><><><><><><><><><><><><><><><><><><><> 
Thomas Enzi                             Thomas.Enzi at wu-wien.ac.at 
Research and Development, UNIVERSAL (http://www.ist-universal.org/) 
<><><><><><><><><><><><><><><><><><><><><><><><><><><> 
Department of Information Systems, New Media 
Vienna University of Economics and Business Administration 
<><><><><><><><><><><><><><><><><><><><><><><><><><><> 
Abteilung für Wirtschaftsinformatik, Neue Medien 
Wirtschaftsuniversität Wien 
Augasse 2-6, A-1090 Vienna, Austria http://nm.wu-wien.ac.at 
Tel: (+43-1) 31 336 x4417, Fax: (+43-1) 31 336 x746 
<><><><><><><><><><><><><><><><><><><><><><><><><><><>




More information about the jdom-interest mailing list