System.Xml.XPath.XPathNavigator.InsertAfter Method

Creates a new sibling node after the currently selected node using the XML string specified.

Syntax

public virtual void InsertAfter (string newSibling)

Parameters

newSibling
The XML data string for the new sibling node.

Remarks

To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is InsertAfter("<book/>"). The string for inserting the text "book" after the current node's text node is InsertAfter("book"). If the XML string contains multiple nodes, all nodes are added.

The following are important notes to consider when using the XPathNavigator.InsertAfter(string) method.

Requirements

Namespace: System.Xml.XPath
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0