Re: [xsl] to get the descendants at only one level - xpath

Subject: Re: [xsl] to get the descendants at only one level - xpath
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Wed, 06 Feb 2008 19:35:24 +0100
Senthil Nathan wrote:
Actually I'm giving the xpath query to the libxml2 library and it
returns everything under that path for that query.
/root/level1/child::*

I tried the other solution also, /root/level1/* which also does the same.

XPath does select nodes in an existing document, it does not change that document. So the result of that XPath is a node-set with the child elements at the third level but those elements keep their own children. If you want to manipulate a document you need XSLT (or XQuery).



--


	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread