标签:.com pre 技术 list cts console nod tun line
XmlNodeList students = doc.DocumentElement.ChildNodes;//Student节点集合 foreach (XmlNode stu in students) { XmlElement element = (XmlElement)stu; string stuId = element.GetAttribute("StuID"); XmlNode nameNode = element.SelectSingleNode("StuName");//获取Person节点的Name节点 string name = nameNode.InnerText; Console.WriteLine(stuId + "," + name); }
案例xml文件
标签:.com pre 技术 list cts console nod tun line
原文地址:http://www.cnblogs.com/rengke2002/p/6044136.html