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

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


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

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 

I see the following:

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

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

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 Ellsworth
scott at alodar.com

More information about the jdom-interest mailing list