C# 读取当前文件夹xml
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); /*** *输出为元素+实例 * * **/ } }