RE: XPath - excluding specified childNodes from result
> I'm simply trying to exclude a specified child node from > being within the nodeList created by my expression e.g. > > > > <document> > <a> > <b> > </b> > <c> > </c> > </a> > </document> > > Select node 'a' but remove child 'c' from the result set. XPath expressions return a set of nodes from the original tree. They can't modify the tree in any way. The <a> node in your document has a <c> child, and there is nothing any XPath expression can do to change that. The expression /document/a doesn't actually include either the b or c elements in its result set, but the a that it returns is the original a, with its children intact. Michael Kay http://www.saxonica.com/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format