[jdom-interest] Not finding attributes on an element
    Scott Ellsworth 
    scott at alodar.com
       
    Mon Jul 30 09:34:02 PDT 2001
    
    
  
Howdy.
I have a complicated program that used to work correctly until I synched up 
to one of the recent builds.  I grabbed the latest on 7/27.
When I write a chunk of XML with JDOM, I use the code:
static final String RUNE_SKILL_NAME="is_rune_skill"
Element skill=new Element("skill", ns);
if (isRuneSkillItem.booleanPrimitiveValue()) 
skill.setAttribute(RUNE_SKILL_NAME, "true", ns);
The XML produced is:
<RQbyScott:skill RQbyScott:is_rune_skill="true">
</RQbyScott:skill>
I then try to read it with
String isRuneSkillString=skill.getAttributeValue(RUNE_SKILL_NAME, ns);
cat.debug("isRuneSkillString: "+isRuneSkillString);
RQbyScott is the proper name space, but isRuneSkillString is always null.
My parser is Xerces 1.3.0.
Any ideas?
Scott
Scott Ellsworth
scott at alodar.com
    
    
More information about the jdom-interest
mailing list