我有[部分] XML:
<Events>
<Properties>
<Property Descriptor=100>1378314024</Property>
<Property Descriptor=200>ABC1234</Property>
</Properties>
<Properties>
<Property Descriptor=100>1378314022</Property>
<Property Descriptor=200>123456</Property>
</Properties>
<Properties>
<Property Descriptor=100>1378314023</Property>
<Property Descriptor=200>123456</Property>
</Properties>
</Events>
如何在@Property Descriptor="100"
上第一次出现123456时选择@Property Descriptor="200"
?
答案 0 :(得分:1)
你可以这样做:
(//Properties[Property[@Descriptor='200'][.='123456']]/Property[@Descriptor='100'])[1]