日期:2014-05-18 浏览次数:20735 次
<Claxx> <ms> <result> <A>1</A> <B>2</B> <C>3</C> <D>4</D> <RESULT></RESULT> </result> <result> <A>1</A> <B>2</B> <C>3</C> <D>4</D> <RESULT>ABCDEFGHIJKLMN</RESULT> </result> <result> <A>1</A> <B>2</B> <C>r3</C> <D>4</D> <RESULT>ABCDEFGHIJKLMN</RESULT> </result> </ms> </Claxx>
XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"c:\test.xml"); XmlNodeList nodes = xmlDoc.SelectNodes(@"//result[position()>1]/D"); foreach (XmlNode node in nodes) Console.WriteLine(node.OuterXml); Console.ReadKey();