Creates a new child node at the end of the list of child nodes of the current node using the XML data string specified.
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.
To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is AppendChild("<book/>"). The string for appending the text "book" to the current node's text node is AppendChild("book"). If the XML string contains multiple nodes, all nodes are added.
The following are important notes to consider when using the XPathNavigator.AppendChild(string) method.
The XPathNavigator.AppendChild(string) method is valid only when the System.Xml.XPath.XPathNavigator is positioned on the root node or an element node.
The XPathNavigator.AppendChild(string) method does not affect the position of the System.Xml.XPath.XPathNavigator.