* Change _Config.xml node selection code to allow comments
parent
d4b8e06d55
commit
a78e5ea142
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue