How to select two attributes from the same node with one expression in XPath?

前端 未结 4 1254
悲&欢浪女
悲&欢浪女 2020-12-04 18:59

For example:

//person[@id=\'abc123\']/@haircolor|/@weight\"

PS. there are lots of \"person\" records

4条回答
  •  佛祖请我去吃肉
    2020-12-04 19:56

    If you are trying to get the values of the specified attributes I would suggest introducing a variable for the requested person.

    
    

    After that you can get any attribute from the requested person by using the specified variable.

    
    
    

提交回复
热议问题