public List <XMLElement> Find(string n) { List <XMLElement> v = new List <XMLElement>(); for (IIterator e = Elements(); e.HasNext();) { object o = e.Next(); if ((!(o is XMLElement))) { continue; } XMLElement ele = (XMLElement)o; if (!ele.Equals(ele.GetName())) { IIterator it = ele.Elements(n); for (; it.HasNext();) { XMLElement child = (XMLElement)it.Next(); child.parent = ele; CollectionUtils.Add(v, child); } continue; } else if (ele.Equals(ele.GetName())) { CollectionUtils.Add(v, (XMLElement)o); continue; } } return(v); }
public void Start_ele(XMLElement ele) { for (IIterator it = ele.Elements(); it.HasNext();) { XMLElement e = (XMLElement)it.Next(); Start_ele(e.GetName()); } }
public void Start_ele(XMLElement ele) { for (IIterator it = ele.Elements(); it.HasNext();) { XMLElement e = (XMLElement) it.Next(); Start_ele(e.GetName()); } }