To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is InsertBefore("<book/>"). The string for inserting the text "book" before the current node's text node is InsertBefore("book"). If the XML string contains multiple nodes, all nodes are added.
The following are important notes to consider when using the XPathNavigator.InsertBefore(string) method.
The XPathNavigator.InsertBefore(string) method is valid only when the System.Xml.XPath.XPathNavigator is positioned on an element, text, processing instruction, or comment node.
The XPathNavigator.InsertBefore(string) method does not affect the position of the System.Xml.XPath.XPathNavigator.