XPath expression to find elements whose tag name contains 'Name'

前端 未结 2 1360
自闭症患者
自闭症患者 2020-12-30 21:45

I am a newcomer to XPath.

I am looking for a way to get all elements whose tag name contains a particular string.

For example, if I have XML like below, I wa

2条回答
  •  萌比男神i
    2020-12-30 22:38

    Since there is no Namespace prefix, you can also use

    //*[contains(name(), 'Name')]
    

提交回复
热议问题