public TermTable(string filePath)
        {
            _filePath = filePath;
            _terms    = new List <ISearchTerm>();

            XmlDocument document = new XmlDocument();

            document.Load(filePath);

            foreach (XmlNode node in document.SelectNodes("xmldata/PLCKTT/Lang/Term"))
            {
                string text      = node.Attributes["Term"].InnerText;
                int    severity  = Int32.Parse(node.Attributes["Severity"].InnerText, CultureInfo.InvariantCulture);
                string termClass = node.Attributes["TermClass"].InnerText;
                string comment   = node.SelectSingleNode("Comment").InnerText;

                string  recommended     = null;
                XmlNode recommendedNode = node.SelectSingleNode("RecommendedTerm");
                if (recommendedNode != null)
                {
                    recommended = recommendedNode.InnerText;
                }

                SearchTerm term = new SearchTerm(this, text, severity, termClass, comment, recommended);

                foreach (XmlNode exclusionNode in node.SelectNodes("Exclusion"))
                {
                    term.AddExclusion(exclusionNode.InnerText);
                }
                foreach (XmlNode exclusionNode in node.SelectNodes("ExclusionContext"))
                {
                    term.AddExclusion(exclusionNode.InnerText);
                }

                _terms.Add(term);
            }

            if (_terms.Count == 0)
            {
                throw new ArgumentException("The file did not specify a valid term table.", "filePath");
            }
        }
        public TermTable(string filePath)
        {
            _filePath = filePath;
            _terms = new List<ISearchTerm>();

            XmlDocument document = new XmlDocument();
            document.Load(filePath);

            foreach (XmlNode node in document.SelectNodes("xmldata/PLCKTT/Lang/Term"))
            {
                string text = node.Attributes["Term"].InnerText;
                int severity = int.Parse(node.Attributes["Severity"].InnerText, CultureInfo.InvariantCulture);
                string termClass = node.Attributes["TermClass"].InnerText;
                string comment = node.SelectSingleNode("Comment").InnerText;

                string recommended = null;
                XmlNode recommendedNode = node.SelectSingleNode("RecommendedTerm");
                if (recommendedNode != null)
                {
                    recommended = recommendedNode.InnerText;
                }

                SearchTerm term = new SearchTerm(this, text, severity, termClass, comment, recommended);

                foreach (XmlNode exclusionNode in node.SelectNodes("Exclusion"))
                {
                    term.AddExclusion(exclusionNode.InnerText);
                }
                foreach (XmlNode exclusionNode in node.SelectNodes("ExclusionContext"))
                {
                    term.AddExclusion(exclusionNode.InnerText);
                }

                _terms.Add(term);
            }

            if (_terms.Count == 0)
            {
                throw new ArgumentException("The file did not specify a valid term table.", "filePath");
            }
        }