.Net 操作XML,快速查找节点
XML:
<EHR>
...
<item name='张三' date='2011-11-12' />
<item name='李四' date='2009-10-12' />
<item name='肖建' date='1982-11-02' />
...
</EHR>
XmlNode sxn = xmlDoc.SelectSingleNode("//EHR/item[@name='张三' and @data='2011-12-12']");
<EHR>
...
<item name='张三' date='2011-11-12' />
<item name='李四' date='2009-10-12' />
<item name='肖建' date='1982-11-02' />
...
</EHR>
XmlNode sxn = xmlDoc.SelectSingleNode("//EHR/item[@name='张三' and @data='2011-12-12']");