# HG changeset patch # User IBBoard # Date 1237741849 0 # Node ID db951aad24b9c2161bc4b58339d5da1d53ddb071 # Parent d0812d7de39dc66de3924e9e19a83e875a23c833 Re #50 - Complete loading of WarFoundry XML * Fix loading of armour type by fixing typo in Race schema * Revert to an exception if there is a parse error on the armour type (since the schema should validate it) diff -r d0812d7de39d -r db951aad24b9 api/Factories/Xml/WarFoundryXmlFactory.cs --- a/api/Factories/Xml/WarFoundryXmlFactory.cs Sun Mar 22 17:05:01 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlFactory.cs Sun Mar 22 17:10:49 2009 +0000 @@ -542,16 +542,10 @@ } catch(ArgumentException ex) { - //throw new InvalidFileException("Attribute 'armourType' of equipment "+id+" was not a valid value from the enumeration"); - LogNotifier.WarnFormat(GetType(), "Invalid 'armourType' for equipment {0} - {1}", id, ex.Message); - armourType = ArmourType.None; + throw new InvalidFileException("Attribute 'armourType' of equipment "+id+" was not a valid value from the enumeration"); } - if (elem.ChildNodes.Count>0) - { - //It has stats! - //TODO: Parse equipment stats - } + //TODO: Parse equipment stats if there are any return new EquipmentItem(id, name, cost, min, max, armourType, race); } diff -r d0812d7de39d -r db951aad24b9 dtds/race.xsd --- a/dtds/race.xsd Sun Mar 22 17:05:01 2009 +0000 +++ b/dtds/race.xsd Sun Mar 22 17:10:49 2009 +0000 @@ -127,7 +127,7 @@ - +