Exemplo n.º 1
0
        private List <IKeyword> GetKeywords()
        {
            const string LOAD_KEYWORDS = @"<PROJECT><PAGE guid=""{0}""><KEYWORDS action=""load"" /></PAGE></PROJECT>";
            var          xmlDoc        = _page.Project.ExecuteRQL(LOAD_KEYWORDS.RQLFormat(_page));

            return
                ((from XmlElement curNode in xmlDoc.GetElementsByTagName("KEYWORD")
                  select(IKeyword) new Keyword(_page.Project, curNode)).ToList());
        }
        private List <IKeyword> GetAssignedKeywords()
        {
            const string LOAD_KEYWORDS = @"<LINK guid=""{0}""><KEYWORDS action=""load""/></LINK>";
            var          xmlDoc        = _parent.Project.ExecuteRQL(LOAD_KEYWORDS.RQLFormat(_parent), RqlType.SessionKeyInProject);

            var keywords = xmlDoc.SelectNodes("/IODATA/CATEGORIES/CATEGORY/KEYWORDS/KEYWORD");

            return(keywords == null
                       ? new List <IKeyword>()
                       : (from XmlElement keyword in keywords select(IKeyword) new Keyword(_parent.Project, keyword))
                   .ToList());
        }