public XElemList Elements() { var result = new XElemList(); foreach (XElem elem in this.Children) { result.Add(elem); } return(result); }
public XElemList Elements(string elemName) { var result = new XElemList(); if (this.HasChildren) { foreach (XElem elem in this.Children) { if (elem.Name.Equals(elemName)) { result.Add(elem); } } } return(result); }