ReplaceSelf()

XPathNavigator::ReplaceSelf(String) method

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

virtual void System::Xml::XPath::XPathNavigator::ReplaceSelf(String newNode)

Arguments

ParameterTypeDescription
newNodeStringThe XML data string for the new node.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe XML string parameter is nullptr.
InvalidOperationExceptionThe XPathNavigator is not positioned on an element, text, processing instruction, or comment node.
NotSupportedExceptionThe XPathNavigator does not support editing.
XmlExceptionThe XML string parameter is not well-formed.

XPathNavigator::ReplaceSelf(SharedPtr<XmlReader>) method

Replaces the current node with the contents of the XmlReader object specified.

virtual void System::Xml::XPath::XPathNavigator::ReplaceSelf(SharedPtr<XmlReader> newNode)

Arguments

ParameterTypeDescription
newNodeSharedPtr<XmlReader>An XmlReader object positioned on the XML data for the new node.

Exceptions

ExceptionDescription
ArgumentExceptionThe XmlReader object is in an error state or closed.
ArgumentNullExceptionThe XmlReader object parameter is nullptr.
InvalidOperationExceptionThe XPathNavigator is not positioned on an element, text, processing instruction, or comment node.
NotSupportedExceptionThe XPathNavigator does not support editing.
XmlExceptionThe XML contents of the XmlReader object parameter is not well-formed.

XPathNavigator::ReplaceSelf(SharedPtr<XPathNavigator>) method

Replaces the current node with the contents of the XPathNavigator object specified.

virtual void System::Xml::XPath::XPathNavigator::ReplaceSelf(SharedPtr<XPathNavigator> newNode)

Arguments

ParameterTypeDescription
newNodeSharedPtr<XPathNavigator>An XPathNavigator object positioned on the new node.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe XPathNavigator object parameter is nullptr.
InvalidOperationExceptionThe XPathNavigator is not positioned on an element, text, processing instruction, or comment node.
NotSupportedExceptionThe XPathNavigator does not support editing.
XmlExceptionThe XML contents of the XPathNavigator object parameter is not well-formed.

See Also