System.Xml.XPath.XPathNavigator.ReplaceSelf Method

Replaces the current node with the content of the string specified.

Syntax

public virtual void ReplaceSelf (string newNode)

Parameters

newNode
The XML data string for the new node.

Remarks

The System.Xml.XPath.XPathNavigator is positioned on the new node on completion of the XPathNavigator.ReplaceSelf(string) method and returns true. The System.Xml.XPath.XPathNavigator is not positioned on the new node after completion of the XPathNavigator.ReplaceSelf(string) method when the XML input is string.Empty in which case the System.Xml.XPath.XPathNavigator is either positioned on the next sibling node or the parent node if there is no next sibling node to the replaced node and the XPathNavigator.ReplaceSelf(string) returns false.

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