xsl-list
[Top] [All Lists]

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

2008-02-06 11:35:54
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--