[jdom-interest] Namespace and getChild()

Schmidt, Chris cschmidt at servicemagic.com
Fri Jan 12 14:30:23 PST 2007


Just out of curiousity, I was wondering why if you call
Element.getChild( elementName ) without explicitly passing a namespace,
why does JDOM assume no namespace rather than assuming the namespace of
the parent element ( the element you are calling getChild() against )?

 

It seems like that since when the XML is parsed, child elements that
don't have a namespace defined inherit their parent elements namespace,
that the getChild() method would behave the same way when not passing a
specific namespace in. 

 

Just my $0.02

 

Thoughts?

 

Chris Schmidt

Web Developer

ServiceMagic

email: <mailto:cschmidt at servicemagic.com> cschmidt at servicemagic.com
<mailto:cschmidt at servicemagic.com> 

phone: 303-963-7254

web: http://www.servicemagic.com <http://www.servicemagic.com> 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20070112/563a010f/attachment.htm


More information about the jdom-interest mailing list