diff api/Factories/Xml/WarFoundryXmlSaver.cs @ 112:863518044d38

Re #54: Add Army support to WarFoundryFactory * Stop "custom equipment" node being mandatory * Remove unused "ratio" definition * Change "integer or ratio" definition to "integer or percentage" * Use "integer or percentage" definition in army XSD * Add exception to say that required objects were missing (Game System and Race) * Throw exceptions on creating army if game system or race is missing Re #53: Add saving of Army to XML file * Add namespace attributes to XML root node
author IBBoard <dev@ibboard.co.uk>
date Sat, 22 Aug 2009 18:18:20 +0000
parents f0fb96d0cfe9
children d0c60b3204c1
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlSaver.cs	Sat Aug 22 15:34:25 2009 +0000
+++ b/api/Factories/Xml/WarFoundryXmlSaver.cs	Sat Aug 22 18:18:20 2009 +0000
@@ -71,6 +71,8 @@
 			schema.Namespaces.Add("xmlns:core", "http://ibboard.co.uk/warfoundry/core");
 			doc.Schemas.Add(schema);
 			XmlElement root = doc.CreateElement("army");
+			root.SetAttribute("xmlns", "http://ibboard.co.uk/warfoundry/army");
+			root.SetAttribute("xmlns:core", "http://ibboard.co.uk/warfoundry/core");
 			doc.AppendChild(root);
 			root.SetAttribute("id", XmlTools.GetAsciiXmlIdForString(toSave.ID));
 			root.SetAttribute("name", toSave.Name);