Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] Namespace and getChild()

Schmidt, Chris

2007-01-12

Replies:

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: cschmidt@servicemagic.com

phone: 303-963-7254

web: http://www.servicemagic.com

 

 

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.