diff api/Factories/Xml/WarFoundryXmlRaceFactory.cs @ 53:1b35eed503ef

Closes #13 - Migrate to XPath * Remove elem.ChildNodes calls and use XPath to make sure we're getting the nodes we think we should
author IBBoard <dev@ibboard.co.uk>
date Wed, 01 Apr 2009 19:20:27 +0000
parents 64ef178c18aa
children 9080366031c0
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlRaceFactory.cs	Mon Mar 30 19:44:03 2009 +0000
+++ b/api/Factories/Xml/WarFoundryXmlRaceFactory.cs	Wed Apr 01 19:20:27 2009 +0000
@@ -131,7 +131,7 @@
 			
 			Stats stats = new Stats(statsSet);
 			
-			foreach (XmlElement stat in elem.ChildNodes)
+			foreach (XmlElement stat in WarFoundryXmlFactoryUtils.SelectNodes(elem, "race:stat"))
 			{
 				String statID = stat.GetAttribute("name");
 				StatSlot slot = statsSet[statID];