Xpath query to find elements which contain a certain descendant

后端 未结 4 422
野性不改
野性不改 2020-12-13 12:39

I\'m using Html Agility Pack to run xpath queries on a web page. I want to find the rows in a table which contain a certain interesting element. In the example below, I wa

4条回答
  •  清歌不尽
    2020-12-13 13:45

    "has a descendant named interestintag" is spelled .//interestintag in XPath, so the expression you are looking for is:

    //table[@name='important']/tr[.//interestingtag]
    

提交回复
热议问题