From a78e5ea14249590aa0197728034d10c3742e800a Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 9 Aug 2008 19:51:49 +0000 Subject: [PATCH] * Change _Config.xml node selection code to allow comments --- .../Framework/Configuration/XML/XmlConfiguration.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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()