Exemplo n.º 1
0
        internal XMLList Filter(string selector)
        {
            bool allFit = true;

            _tmpList.Clear();
            foreach (XML xml in this._list)
            {
                if (xml.name != selector)
                {
                    allFit = false;
                }
                else
                {
                    _tmpList.Add(xml);
                }
            }

            if (allFit)
            {
                return(this);
            }
            XMLList ret = new XMLList(_tmpList);

            _tmpList = new List <XML>();
            return(ret);
        }
Exemplo n.º 2
0
 public XMLList Elements(string selector)
 {
     if (this._children == null)
     {
         this._children = new XMLList();
     }
     return(this._children.Filter(selector));
 }
Exemplo n.º 3
0
 public XMLList Elements()
 {
     return(this._children ?? (this._children = new XMLList()));
 }