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); }
public XMLList Elements(string selector) { if (this._children == null) { this._children = new XMLList(); } return(this._children.Filter(selector)); }
public XMLList Elements() { return(this._children ?? (this._children = new XMLList())); }