C# 读取xml
//xml -解析 private void xmldode() { XmlDocument doc = new XmlDocument(); String stpa = "XMLFile1.xml"; //解析当前目录xml文件 doc.Load(stpa); XmlNodeList list = doc.SelectNodes("bookstore/nihao/title"); foreach (XmlNode node in list) { oulog(node.Name + ":" + node.InnerText); /*** *输出为元素+实例 * * **/ } }
原文:http://www.cnblogs.com/hs22/p/7220046.html