HandCoded.Xml.MutableNodeList.Add C# (CSharp) 메소드

Add() 공개 메소드

Adds the indicated XmlNode instance to the current MutableNodeList.
public Add ( XmlNode node ) : void
node System.Xml.XmlNode The to be added.
리턴 void
        public void Add(XmlNode node)
        {
            if (!nodes.Contains (node)) nodes.Add (node);
        }

Usage Example

예제 #1
0
        /// <summary>
        /// Locates all the child elements of the given parent <see cref="XmlElement"/>
        /// and returns them in a (possibly empty) <see cref="XmlNodeList"/>.
        /// </summary>
        /// <param name="parent">The parent <see cref="XmlElement"/>.</param>
        /// <returns>A possibly empty <see cref="XmlNodeList"/> of child elements.</returns>
        public static XmlNodeList GetChildElements(XmlElement parent)
        {
            MutableNodeList	list	= new MutableNodeList ();

            if (parent != null) {
                foreach (XmlNode node in parent.ChildNodes)
                    if (node.NodeType == XmlNodeType.Element) list.Add (node);
            }
            return (list);
        }
All Usage Examples Of HandCoded.Xml.MutableNodeList::Add