internal XMLList Filter(string selector) { bool allFit = true; _tmpList.Clear(); foreach (XML xml in _list) { if (xml.name != selector) { allFit = false; } else { _tmpList.Add(xml); } } if (allFit) { return(this); } else { XMLList ret = new XMLList(_tmpList); _tmpList = new List <XML>(); return(ret); } }
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); }
static public int get_Count(IntPtr l) { try { FairyGUI.Utils.XMLList self = (FairyGUI.Utils.XMLList)checkSelf(l); pushValue(l, true); pushValue(l, self.Count); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int getItem(IntPtr l) { try { FairyGUI.Utils.XMLList self = (FairyGUI.Utils.XMLList)checkSelf(l); int v; checkType(l, 2, out v); var ret = self[v]; pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
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; }