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
| Parameter | Type | Description |
|---|
| newNode | String | The XML data string for the new node. |
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | The XML string parameter is nullptr. |
| InvalidOperationException | The XPathNavigator is not positioned on an element, text, processing instruction, or comment node. |
| NotSupportedException | The XPathNavigator does not support editing. |
| XmlException | The 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
Exceptions
| Exception | Description |
|---|
| ArgumentException | The XmlReader object is in an error state or closed. |
| ArgumentNullException | The XmlReader object parameter is nullptr. |
| InvalidOperationException | The XPathNavigator is not positioned on an element, text, processing instruction, or comment node. |
| NotSupportedException | The XPathNavigator does not support editing. |
| XmlException | The 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
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | The XPathNavigator object parameter is nullptr. |
| InvalidOperationException | The XPathNavigator is not positioned on an element, text, processing instruction, or comment node. |
| NotSupportedException | The XPathNavigator does not support editing. |
| XmlException | The XML contents of the XPathNavigator object parameter is not well-formed. |
See Also