- 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 {
- }
来源: http://www.phpxs.com/code/1009783/