Xpath query to find elements which contain a certain descendant

后端 未结 4 420
野性不改
野性不改 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:29

    I know it is a late answer but why not going the other way around. Finding all tags and then select the parent tag.

    //interestingtag/ancestor::tr
    

提交回复
热议问题