コード例 #1
0
        internal void AddChild(XElem node)
        {
            if (this.Children == null)
            {
                this.Children = new XElemList();
            }

            this.Children.Add(node);
        }
コード例 #2
0
        public XElemList Elements()
        {
            var result = new XElemList();

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

            return(result);
        }
コード例 #3
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);
        }