Mercurial > repos > IBBoard.WarFoundry.API
diff API/Factories/Xml/WarFoundryXmlFactoryUtils.cs @ 382:6da9db4a9c23
Re #241: Use built-in .Net methods
* Switch to built-in methods (list on http://www.ironshay.com/post/Use-NET-Built-in-Methods-to-Save-Time-and-Headaches.aspx)
* Tidy up code and fix export issue (trying to download DTD)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 13 Aug 2011 10:45:06 +0000 |
parents | 3c4a6403a88c |
children | 71fceea2725b |
line wrap: on
line diff
--- a/API/Factories/Xml/WarFoundryXmlFactoryUtils.cs Sun Aug 07 19:15:33 2011 +0000 +++ b/API/Factories/Xml/WarFoundryXmlFactoryUtils.cs Sat Aug 13 10:45:06 2011 +0000 @@ -67,12 +67,12 @@ settings.ProhibitDtd = true; settings.ValidationEventHandler+= new ValidationEventHandler(ValidationEventMethod); XmlSchemaSet cache = new XmlSchemaSet(); - string path = IBBoard.Constants.ExecutablePath + "/schemas/"; - AddSchemaToCache(cache, NS_BASE + "core", path + "warfoundry-core.xsd"); - AddSchemaToCache(cache, NS_BASE + "cats", path + "warfoundry-cats.xsd"); - AddSchemaToCache(cache, NS_BASE + "race", path + "race.xsd"); - AddSchemaToCache(cache, NS_BASE + "system", path + "system.xsd"); - AddSchemaToCache(cache, NS_BASE + "army", path + "army.xsd"); + string path = Path.Combine(IBBoard.Constants.ExecutablePath, "schemas"); + AddSchemaToCache(cache, NS_BASE + "core", Path.Combine(path, "warfoundry-core.xsd")); + AddSchemaToCache(cache, NS_BASE + "cats", Path.Combine(path, "warfoundry-cats.xsd")); + AddSchemaToCache(cache, NS_BASE + "race", Path.Combine(path, "race.xsd")); + AddSchemaToCache(cache, NS_BASE + "system", Path.Combine(path, "system.xsd")); + AddSchemaToCache(cache, NS_BASE + "army", Path.Combine(path, "army.xsd")); settings.Schemas.Add(cache); settings.Schemas.CompilationSettings.EnableUpaCheck = false; }