日期:2014-05-17 浏览次数:20804 次
<?xml version="1.0"?> -<ArrayOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><anyType xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:string">AAAA </anyType><anyType xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:string">BBB </anyType><anyType xmlns:a="http://www.w3.org/2001/XMLSchema" i:type="a:string">CCC </anyType></ArrayOfanyType>
System.Xml.XmlDocument xdoc = new System.Xml.XmlDocument(); xdoc.Load(@"c:\test.xml"); List<string> result = new List<string>(); foreach (XmlNode node in xdoc.ChildNodes[1].ChildNodes) { result.Add(node.InnerText); }