Mercurial > repos > IBDev-IBBoard.WarFoundry.API
changeset 71:0303ac938fc5
Re #50 - Complete core loading of WarFoundry XML files
* Fix XPath query to get a specific unit from a document
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 25 Apr 2009 19:38:55 +0000 |
parents | 780f3926abad |
children | e7a6f460be57 |
files | api/Factories/Xml/WarFoundryXmlRaceFactory.cs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlRaceFactory.cs Sat Apr 25 19:29:51 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlRaceFactory.cs Sat Apr 25 19:38:55 2009 +0000 @@ -92,7 +92,7 @@ private UnitType GetUnitTypeFromDocument(XmlDocument doc, string id, Race parentRace) { - return GetUnitTypeForElement(WarFoundryXmlFactoryUtils.SelectSingleElement(doc, "/race:race/race:units/race:unit[id="+id+"]"), parentRace); + return GetUnitTypeForElement(WarFoundryXmlFactoryUtils.SelectSingleElement(doc, "/race:race/race:units/race:unit[@id='"+id+"']"), parentRace); } private UnitType GetUnitTypeForElement(XmlElement elem, Race parentRace)