Select a node with XPath whose child node contains a specific inner text

后端 未结 4 1726
小鲜肉
小鲜肉 2021-02-14 03:14

Given the following XML:


    
  • abcText1cba
  • abcText2cba
  • 4条回答
    •  鱼传尺愫
      2021-02-14 03:41

      Just for readers. The xpath is correct. OP: Perhaps xpath parser didnt support the expression?

      /root/li[span[contains(text(), "Text1")]]
      

    提交回复
    热议问题