System.Xml.XPath.XPathNavigator.ReplaceSelf Method

Replaces the current node with the contents of the System.Xml.XPath.XPathNavigator object specified.

Syntax

public virtual void ReplaceSelf (XPathNavigator newNode)

Parameters

newNode
An System.Xml.XPath.XPathNavigator object positioned on the new node.

Remarks

The System.Xml.XPath.XPathNavigator is positioned on the new node on completion of the XPathNavigator.ReplaceSelf(XPathNavigator) method and returns true. The System.Xml.XPath.XPathNavigator is not positioned on the new node after completion of the XPathNavigator.ReplaceSelf(XPathNavigator) 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(XPathNavigator) 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