Attributes in Xpath local-name()

后端 未结 1 1167
醉话见心
醉话见心 2021-02-09 05:22

This is a small sample of my xml file.


   
      
         


        
相关标签:
1条回答
  • 2021-02-09 06:09

    w:val attribute is in namespace, so you can't just address it by @val. One possible solution is by using @*[local-name()='attribute name'] expression to address an attribute by it's local name, similar to what you've done for elements :

    //*[local-name()="highlight"][@*[local-name()='val' and .='yellow']]/../..//*[local-name()="t"]
    
    0 讨论(0)
提交回复
热议问题