定义一个类[XmlElement("Key")]
public class KeyTextPair{
    [XmlAttribute("name")]
    public string KeyName{
        set{} get{}
    }    [XmlText]
    public string KeyValue{
         set{} get{}
    }
}List<Dictionary<string, KeyTextPair>> collection = new .....你直接序列化collection应该就可以实现了。