示例#1
0
文件: Map.cs 项目: seeseekey/CSCL
		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();
		}