[jdom-interest] namespacing and SAXBuilder

Derek Akers derek at eldan.com
Fri Jan 26 14:43:03 PST 2001

I have an xml document that uses namespacing, but an having problems referencing elements in the DOM.  I am wondering if I have to declare anywhere that the thing should be NameSpace Aware or anything...?  I keep getting a NullPointerException when I try to reference the element's list of attributes thusly:

Element process = ((Element)childs.get(0)).getChild("Process");
  List proAts = process.getAttributes();
  int numProats = proAts.size();

The corresponding xml tag is <boo:Process id="1">

I have tried changing the getChild call to getChild("boo:Process"), on the off chance that that might work, but no luck so far.  could someone give me a hand here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20010126/130d8fa4/attachment.htm

More information about the jdom-interest mailing list