Getting the value of brother/sister node

前端 未结 1 1585
攒了一身酷
攒了一身酷 2020-12-19 17:31

Let\'s say on a page I have alot of this repeated:


                      
相关标签:
1条回答
  • 2020-12-19 18:20

    Use this XPath:

    //div/h4[. = 'Magic:']/following-sibling::a[1]
    

    It selects 1st following-sibling a element of h4 with value Magic:.

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