[jdom-interest] Re: Not finding attributes on an element

Scott Ellsworth scott at alodar.com
Mon Jul 30 10:13:33 PDT 2001


Howdy.

More information:
Reading:
<?xml version="1.0" encoding="UTF-8"?>
<RQbyScott:character xmlns:RQbyScott="http://iceweasel.com/xml/RQbyScott">
	<RQbyScott:skill RQbyScott:is_rune_skill="true">
	</RQbyScott:skill>
</RQbyScott:character>

Use the following on the appropriate skill Element:

List attributes=skill.getAttributes();
String uri = ns.getURI();
cat.debug("ns "+ns+" has URI "+ns.getURI());
Iterator i = attributes.iterator();
while (i.hasNext()) {
	Attribute att = (Attribute)i.next();
	cat.debug("Att "+att+" with name "+att.getName()+" has namespace URI 
"+att.getNamespaceURI());
}

I see the following:

ns [Namespace: prefix "RQbyScott" is mapped to URI 
"http://iceweasel.com/xml/RQbyScott"] has URI 
http://iceweasel.com/xml/RQbyScott

Att [Attribute: is_rune_skill="true"] with name is_rune_skill has namespace 
URI

So, for some reason, the attribute above is not getting read with the 
proper namespace.

Does this ring any bells with anyone?  I have searched the archives, but if 
this is a know bug, I did not run across it.

Scott
Scott Ellsworth
scott at alodar.com




More information about the jdom-interest mailing list