Creates a new child node at the end of the list of child nodes of the current node using the XML contents of the System.Xml.XmlReader object specified.
- newChild
- An System.Xml.XmlReader object positioned on the XML data for the new child node.
Appending a child node adds the new node to the end of the list of child nodes for the current node. For example, when three child nodes exist for an element, the appended node becomes the fourth child node. If no child nodes exist, then a new child node is created.
The following are important notes to consider when using the XPathNavigator.AppendChild(System.Xml.XmlReader) method.
If the System.Xml.XmlReader object is positioned over a sequence of XML nodes, all the nodes in the sequence are added.
The XPathNavigator.AppendChild(System.Xml.XmlReader) method is valid only when the System.Xml.XPath.XPathNavigator is positioned on the root node or an element node.
The XPathNavigator.AppendChild(System.Xml.XmlReader) method does not affect the position of the System.Xml.XPath.XPathNavigator.