示例#1
0
        public XElemList Elements()
        {
            var result = new XElemList();

            foreach (XElem elem in this.Children)
            {
                result.Add(elem);
            }

            return(result);
        }
示例#2
0
        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);
        }