How do I select multiple sets of attributes within an XML document using XPath?

后端 未结 2 1960
野性不改
野性不改 2020-12-06 12:57

I am having trouble constructing a single XPath statement to return two different sets of attributes.

For example take the following XML document:

         


        
2条回答
  •  难免孤独
    2020-12-06 13:28

    By using the | operator in an XPath expression you can select several paths:

    //@alpha | //@beta
    

提交回复
热议问题