鉴于此 XML,我想从匹配“技术”XmlNodeList
的节点中检索一个<member>
节点。匹配应该不区分大小写。<group>
<id>
<groups>
<group>
<id>Tech</id>
<members>
<member>johndoe</member>
<member>janedoe</member>
<member>robdoe</member>
</members>
</group>
<group>
<id>Support</id>
<members>
<member>johnfoe</member>
<member>janefoe</member>
<member>robfoe</member>
</members>
</group>
</groups>
我试过这个,希望得到“doe members”,但它似乎没有返回任何结果。
// assume groupName='tech'
_document.SelectNodes("//groups/group[translate(id,'abcdefghijklmnopqrstuvxyz','ABCDEFGHIJKLMNOPQRSTUVXYZ')='" + groupName.ToUpper() + "']/members/member");