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 {
}