Get nodes where child node contains an attribute

前端 未结 5 1178
长情又很酷
长情又很酷 2020-11-30 21:13

Suppose I have the following XML:


  Purgatorio
  Dante Alighieri<         


        
5条回答
  •  孤街浪徒
    2020-11-30 21:30

    Try to use this xPath expression:

    //book/title[@lang='it']/..
    

    That should give you all book nodes in "it" lang

提交回复
热议问题