Xpath: select node based in a condition (with local-name())

后端 未结 3 1787
刺人心
刺人心 2021-01-31 17:23

The question is quite silly, but I am completely stuck. I want to extract child nodes of a node based on a condition. The XML is as follows:

 
 

        
3条回答
  •  [愿得一人]
    2021-01-31 18:11

    Try this

    /a/aCode[text()='aaa']
    

    or

    //*[local-name() = 'aCode' and text() = 'aaa']
    

    You have used // at wrong place.

提交回复
热议问题