[jdom-interest] Last call: getChild/getChildren versus
getChildElement/getChildElements
Elliotte Rusty Harold
elharo at metalab.unc.edu
Thu Feb 5 18:04:08 PST 2004
At 3:11 PM -0800 2/5/04, Jason Hunter wrote:
>And here's more ammo. What does $foo/child::* return in
>XPath/XQuery? All the child elements! So getChildren() makes
>perfect sense in that view.
but $foo/child::node() returns all nodes, not just elements. The
elements part of this expression is in the *, not the child.
getChildElements is the right name for a method that does not return
all children.
--
Elliotte Rusty Harold
elharo at metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
More information about the jdom-interest
mailing list