[Home] [By Thread] [By Date] [Recent Entries]
There's a a lot of misunderstanding here.
When you use an expression like //div, XPath selects the div elements only, it does not select their children or other descendants. It returns to the caller, in effect, pointers to these div elements. What happens next is up to the caller. It's quite common for the caller to process (e.g. display or copy) the whole subtree rooted at a selected element. Such behaviour can't be controlled using the XPath expression, because the XPath engine doesn't determine what the client does with the selected nodes. If you want to return to the client a node that doesn't have these children attached, you can't do this using XPath, because XPath can only select nodes as they exist in the input tree, it can't transform them into a different tree. That's XSLT territory. Michael Kay Saxonica On 30/06/2011 22:23, Joel Dubien wrote: Hello All,
|

Cart



