* Change _Config.xml node selection code to allow comments

0.6.0-stable
Justin Clarke Casey 2008-08-09 19:51:49 +00:00
parent d4b8e06d55
commit a78e5ea142
1 changed files with 5 additions and 5 deletions

View File

@ -46,13 +46,13 @@ namespace OpenSim.Framework.Configuration.XML
private void LoadDataToClass() private void LoadDataToClass()
{ {
rootNode = doc.FirstChild; rootNode = doc.SelectSingleNode("Root");
if (rootNode.Name != "Root") if (null == rootNode)
throw new Exception("Error: Invalid .xml File. Missing <Root>"); throw new Exception("Error: Invalid .xml File. Missing <Root>");
configNode = rootNode.FirstChild; configNode = rootNode.SelectSingleNode("Config");
if (configNode.Name != "Config") if (null == configNode)
throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>"); throw new Exception("Error: Invalid .xml File. <Root> should contain a <Config>");
} }
public void LoadData() public void LoadData()