示例#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);
            }
        }
示例#2
0
 public XMLList Elements(string selector)
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children.Filter(selector));
 }
示例#3
0
 public XMLList Elements()
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children);
 }