How to exclude child nodes with XPath selector?

前端 未结 1 1742
小鲜肉
小鲜肉 2021-01-24 03:12

I have the following HTML fragment:


                      
相关标签:
1条回答
  • 2021-01-24 03:54

    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.

    0 讨论(0)
提交回复
热议问题