private D900CdrDefinitionProvider(string xmlURI)
        {
            _schemaList    = new List <D900CdrDefinitionSchema>();
            _defaultSchema = -1;
            _xmlVersion    = String.Empty;

            bool def;

#if FW35
            XElement cdrXML = XDocument
                              .Load(xmlURI, LoadOptions.None)
                              .Element("D900Cdr");

            __xmlVersion = cdrXML.Attribute("Version").Value;

            foreach (XElement schXML in cdrXML.Elements("Schema"))
            {
                D900CdrDefinitionSchema sch = new D900CdrDefinitionSchema(schXML.Attribute("Name").Value);
                ReadDefinitions(sch.Definitions, schXML, String.Empty);
                _schemaList.Add(sch);
                Boolean.TryParse(schXML.Attribute("Default").Value, out def);
                if (def)
                {
                    _defaultSchema = _schemaList.Count - 1;
                }
            }
#else
            XPathNavigator cdrXML = new XPathDocument(xmlURI)
                                    .CreateNavigator()
                                    .SelectSingleNode("D900Cdr");

            _xmlVersion = cdrXML.GetAttribute("Version", String.Empty);

            foreach (XPathNavigator schXML in cdrXML.Select("Schema"))
            {
                D900CdrDefinitionSchema sch = new D900CdrDefinitionSchema(schXML.GetAttribute("Name", String.Empty));
                ReadDefinitions(sch.Definitions, schXML, String.Empty);
                _schemaList.Add(sch);
                if (Boolean.TryParse(schXML.GetAttribute("Default", String.Empty), out def) && def)
                {
                    _defaultSchema = _schemaList.Count - 1;
                }
            }
#endif
            if ((_defaultSchema < 0) && (_schemaList.Count > 0))
            {
                _defaultSchema = 0;
            }
            _currentSchema = _defaultSchema;
        }
        private D900CdrDefinitionProvider(string xmlURI)
        {
            _schemaList = new List<D900CdrDefinitionSchema>();
            _defaultSchema = -1;
            _xmlVersion = String.Empty;

            bool def;

            #if FW35
            XElement cdrXML = XDocument
                .Load(xmlURI, LoadOptions.None)
                .Element("D900Cdr");

            __xmlVersion = cdrXML.Attribute("Version").Value;

            foreach (XElement schXML in cdrXML.Elements("Schema"))
            {
                D900CdrDefinitionSchema sch = new D900CdrDefinitionSchema(schXML.Attribute("Name").Value);
                ReadDefinitions(sch.Definitions, schXML, String.Empty);
                _schemaList.Add(sch);
                Boolean.TryParse(schXML.Attribute("Default").Value, out def);
                if (def) _defaultSchema = _schemaList.Count - 1;
            }
            #else
            XPathNavigator cdrXML = new XPathDocument(xmlURI)
                .CreateNavigator()
                .SelectSingleNode("D900Cdr");

            _xmlVersion = cdrXML.GetAttribute("Version", String.Empty);

            foreach (XPathNavigator schXML in cdrXML.Select("Schema"))
            {
                D900CdrDefinitionSchema sch = new D900CdrDefinitionSchema(schXML.GetAttribute("Name", String.Empty));
                ReadDefinitions(sch.Definitions, schXML, String.Empty);
                _schemaList.Add(sch);
                if (Boolean.TryParse(schXML.GetAttribute("Default", String.Empty), out def) && def)
                {
                    _defaultSchema = _schemaList.Count - 1;
                }
            }
            #endif
            if ((_defaultSchema < 0) && (_schemaList.Count > 0))
                _defaultSchema = 0;
            _currentSchema = _defaultSchema;
        }