[jdom-interest] namespacing and SAXBuilder

Derek Akers derek at eldan.com
Fri Jan 26 15:05:00 PST 2001


never mind, I got it :)
  ----- Original Message ----- 
  From: Derek Akers 
  To: jdom-interest at jdom.org 
  Sent: Friday, January 26, 2001 5:43 PM
  Subject: [jdom-interest] namespacing and SAXBuilder


  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/2da724d5/attachment.htm


More information about the jdom-interest mailing list