Get value of an attribute

后端 未结 1 873
[愿得一人]
[愿得一人] 2021-01-26 10:54

Here is my XML:-







        
相关标签:
1条回答
  • 2021-01-26 11:37

    Use the following query:

    /Book/BookKey/Value/@value
    

    To address the value attribute only when concept == title you might want:

    /Book/BookKey/Value[@concept="Title"]/@value
    

    Using @ you can address attributes in XPath. Refer to this tutorial

    0 讨论(0)
提交回复
热议问题