I have following XMLRPC response
<value><struct>
<member><name>dedicatedAccountID</name><value><i4>开发者_运维百科1</i4></value></member>
<member><name>dedicatedAccountValue1</name><value><string>0</string></value></member>
<member><name>expiryDate</name><value><dateTime.iso8601>99991231T00:00:00+1200</dateTime.iso8601></value></member>
</struct></value>
<value><struct>
<member><name>dedicatedAccountID</name><value><i4>2</i4></value></member>
<member><name>dedicatedAccountValue1</name><value><string>15635</string></value></member>
<member><name>expiryDate</name><value><dateTime.iso8601>99991231T00:00:00+1200</dateTime.iso8601></value></member>
</struct></value>
<value><struct>
<member><name>dedicatedAccountID</name><value><i4>3</i4></value></member>
<member><name>dedicatedAccountValue1</name><value><string>0</string></value></member>
<member><name>expiryDate</name><value><dateTime.iso8601>99991231T00:00:00+1200</dateTime.iso8601></value></member>
</struct></value>
I want to get value of dedicatedAccountValue1 where member name is dedicatedAccountID its value is 1.
Regards, imran
//value/struct[member[name = 'dedicatedAccountID' and value/* = '1']]/member[name = 'dedicatedAccountValue1']/value/*
//Struct[member/name='dedicatedAccountID' and
member/value/i4='1']/member[name='dedicatedAccountValue1']/value
Try this. Not tested
精彩评论