我有一个看起来像这样的 xml
<Details>
<UserResource>
<ResourceGroup>AJD-IPSP1</ResourceGroup>
<ResourceType>master</ResourceType>
<Access>r</Access>
<UseSOAPFault>soap </UseSOAPFault>
</UserResource>
<UserResource>
<ResourceGroup>AJD-VME1</ResourceGroup>
<ResourceType>trx</ResourceType>
<Access>r</Access>
<UseSOAPFault>soap </UseSOAPFault>
</UserResource>
<UserResource>
<ResourceGroup>AJD-VME10</ResourceGroup>
<ResourceType>trx</ResourceType>
<Access>r</Access>
<UseSOAPFault>soap </UseSOAPFault>
</UserResource>
<UserResource>
<ResourceGroup>AJD-VME11</ResourceGroup>
<ResourceType>trx</ResourceType>
<Access>r</Access>
<UseSOAPFault>soap </UseSOAPFault>
</UserResource>
</Details>
我想要实现的是:
/Details/UserResource[ResourceGroup="AJD-VME10" or ResourceGroup="AJD-VME1"]
结果应该是
<UserResource>
<ResourceGroup>AJD-VME1</ResourceGroup>
<ResourceType>trx</ResourceType>
<Access>r</Access>
<UseSOAPFault>soap </UseSOAPFault>
</UserResource>
<UserResource>
<ResourceGroup>AJD-VME10</ResourceGroup>
<ResourceType>trx</ResourceType>
<Access>r</Access>
<UseSOAPFault>soap </UseSOAPFault>
</UserResource>
我该怎么做这个xpath?
我想只使用一个 xpath 来做这个。