C#读取XML文件

c#
2016-01-23 0 768
C#读取XML文件
try
{
    XmlDocument xmlDoc = new XmlDocument();
    xmlDoc.Load(@"types.xml");
    XmlElement xmlRoot = xmlDoc.DocumentElement;
    foreach (XmlNode node in xmlRoot.ChildNodes)
    {
        Type type = new Type();
        string num = node["num"].InnerText;
        string desc = node["desc"].InnerText;
        string content = node["content"].InnerXml;
    }
}
catch { 

}

遇见资源网 c# C#读取XML文件 http://www.ox520.com/13311.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务