[转] C#下 读取xml节点的数据总结读: 
[转] C#下 读取xml节点的数据总结    
//打开某文件(假设web.config在根目录中)
[转] C#下 读取xml节点的数据总结
    string filename=Server.MapPath("/"+ @"WebApplication1\web.config";
[转] C#下 读取xml节点的数据总结    XmlDocument xmldoc
= new XmlDocument();
[转] C#下 读取xml节点的数据总结    xmldoc.Load(filename);
[转] C#下 读取xml节点的数据总结 
[转] C#下 读取xml节点的数据总结    
//得到顶层节点列表
[转] C#下 读取xml节点的数据总结
    XmlNodeList topM=xmldoc.DocumentElement.ChildNodes;
[转] C#下 读取xml节点的数据总结    
foreach(XmlElement element in topM)

相关文章: