Select an XML element regardless of level with XPATH

后端 未结 4 1900
無奈伤痛
無奈伤痛 2021-02-05 06:48

I have this:


  
    text
  


  text

So I want

4条回答
  •  滥情空心
    2021-02-05 07:28

    You can use // to select all nodes from the current node. So //text() would select all text nodes.

    If you wanted all t elements you would do //t. If you wanted to do do all t elements from a certain point you might then do /x/y//t.

提交回复
热议问题