Skip to content Skip to sidebar Skip to footer

How To Exclude Child Nodes With Xpath Selector?

I have the following HTML fragment:

text

text
... a1<

Solution 1:

XPath is for selection, not for transformation. (XSLT is for transformation.)

You can select div elements that do not contain certain a elements only if the div elements already exist in the input document; you cannot select div elements and then remove child elements once selected.

Post a Comment for "How To Exclude Child Nodes With Xpath Selector?"