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