我有xml文件:
<users>
<user_tuple>
<userid>U01</userid>
<code>
<name>Tom Jones</name>
</code>
<rating>B</rating>
</user_tuple>
<user_tuple>
<userid>U02</userid>
<code>
<name>Mary Doe</name>
</code>
<rating>A</rating>
</user_tuple>
<user_tuple>
<userid>U03</userid>
<code>
<name>Dee Linquent</name>
</code>
<rating>D</rating>
</user_tuple>
如何仅选择 userid.Value== "U01" 和 rating.Value=="B" 等(以及所有子节点/元素),即我想要结果:
<user_tuple>
<userid>U01</userid>
<code>
<name>Tom Jones</name>
</code>
<rating>B</rating>
</user_tuple>