Java Mailing List Archive

http://www.junlu.com/

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

RE: [jdom-interest] Namespace and getChild()

Michael Kay

2007-01-12

Replies:

 > It seems like that since when the XML is parsed, child elements that don’t have a namespace defined inherit their parent elements namespace 
 
Your premise is wrong. Given:
 
<x:a xmlns:x="abc">
  <b/>
</x:a>
 
the b element is in no namespace. A child element with no prefix goes in the default namespace, not the namespace of its parent.
 
In any case, suggesting improvements to an API that obviously can't be changed at this stage of the game is rather futile.
 
Michael Kay
http://www.saxonica.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.