你需要一个包装类; 然后MyWrapper
按照您的示例序列化实例以获取xml.
[XmlRoot("SomeXMLTag")] public class MyWrapper { [XmlElement("AreaFields")] public ListAreaFields { get; set; } } public class AreaFields { [XmlArray("Items")] [XmlArrayItem("Item")] public List Fields { set; get; } [XmlAttribute] public int id { set; get; } } public class Fields { [XmlAttribute] public string Name { set; get; } }