Beispiel #1
0
        public XMLList Filter(string selector)
        {
            bool allFit = true;

            _tmpList.Clear();
            int cnt = rawList.Count;

            for (int i = 0; i < cnt; i++)
            {
                XML xml = rawList[i];
                if (xml.name == selector)
                {
                    _tmpList.Add(xml);
                }
                else
                {
                    allFit = false;
                }
            }

            if (allFit)
            {
                return(this);
            }
            else
            {
                XMLList ret = new XMLList(_tmpList);
                _tmpList = new List <XML>();
                return(ret);
            }
        }
Beispiel #2
0
 public XMLList Elements(string selector)
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children.Filter(selector));
 }
Beispiel #3
0
 public XMLList Elements()
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children);
 }