What is the correct XPath for choosing attributes that contain “foo”?

后端 未结 9 1604
予麋鹿
予麋鹿 2020-11-27 11:15

Given this XML, what XPath returns all elements whose prop attribute contains Foo (the first three nodes):


 

        
9条回答
  •  眼角桃花
    2020-11-27 11:58

    Have you tried something like:

    //a[contains(@prop, "Foo")]

    I've never used the contains function before but suspect that it should work as advertised...

提交回复
热议问题