public static void LoadStarmapFromXml(string filename, ref Starmap s) { XmlDocument document = new XmlDocument(); document.Load(ScriptHost.FileSystem, filename); s.LoadFromXmlNode(document["Starmap"]); }
public static void SaveStarmapToXmlForTools(string filename, Starmap s) { XmlDocument xmlDocument = new XmlDocument(); XmlElement element = xmlDocument.CreateElement("Starmap"); s.AttachToXmlNode(ref element); xmlDocument.AppendChild((XmlNode)element); xmlDocument.Save(filename); }
public static void LoadStarmapFromXmlForTools(string filename, ref Starmap s) { if (!File.Exists(filename)) { return; } XmlDocument xmlDocument = new XmlDocument(); xmlDocument.Load(filename); s.LoadFromXmlNode(xmlDocument["Starmap"]); }