我有以下XMLRPC响应
<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>
我想获得dedicatedAccountValue1的值,其中成员名称为dedicatedAccountID,其值为1.
此致 姆兰
答案 0 :(得分:1)
//value/struct[member[name = 'dedicatedAccountID' and value/* = '1']]/member[name = 'dedicatedAccountValue1']/value/*
答案 1 :(得分:0)
//Struct[member/name='dedicatedAccountID' and
member/value/i4='1']/member[name='dedicatedAccountValue1']/value
试试这个。未经测试