[jdom-interest] getChild(String elementName) -v- getChild(Str ing elementName, Nam espace ns)

philip.nelson at omniresources.com philip.nelson at omniresources.com
Wed Apr 25 10:35:07 PDT 2001

> I'm new to the JDOM API, and I'm using the beta 6 version.  
> When you try to
> find a child of the root element by just name, ignoring the 
> namespace it is
> in, getChild(String elementName) returns null.  When you specify the
> namespace and the name of the child element, the method 
> returns the correct
> results.  Is this correct, or do I not understand the method?

You are correct!  All elements and attributes are in a namespace and you
need to specify that when you retrieve it.

More information about the jdom-interest mailing list