public static void SaveToMapsXml(string filename, List<Map> maps) { XmlData xml=new XmlData(filename, true); maps.Sort(); XmlNode mapsnode=xml.AddRoot("maps"); foreach(Map i in maps) { XmlNode mapNode=xml.AddElement(mapsnode, "map"); xml.AddAttribute(mapNode, "id", i.ID); xml.AddAttribute(mapNode, "name", i.Name); } xml.Save(); }