internal void AddChild(XElem node) { if (this.Children == null) { this.Children = new XElemList(); } this.Children.Add(node); }
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); }