diff --git a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs index 0a9f751cb9..2154e1ed5e 100644 --- a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs +++ b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs @@ -46,13 +46,13 @@ namespace OpenSim.Framework.Configuration.XML private void LoadDataToClass() { - rootNode = doc.FirstChild; - if (rootNode.Name != "Root") + rootNode = doc.SelectSingleNode("Root"); + if (null == rootNode) throw new Exception("Error: Invalid .xml File. Missing "); - configNode = rootNode.FirstChild; - if (configNode.Name != "Config") - throw new Exception("Error: Invalid .xml File. first child should be "); + configNode = rootNode.SelectSingleNode("Config"); + if (null == configNode) + throw new Exception("Error: Invalid .xml File. should contain a "); } public void LoadData()