XPathNavigator::InsertBefore() method
Returns an XmlWriter object used to create a new sibling node before the currently selected node.
virtual SharedPtr<XmlWriter> System::Xml::XPath::XPathNavigator::InsertBefore()
Return Value
An XmlWriter object used to create a new sibling node before the currently selected node.
Exceptions
| Exception | Description |
|---|
| InvalidOperationException | The position of the XPathNavigator does not allow a new sibling node to be inserted before the current node. |
| NotSupportedException | The XPathNavigator does not support editing. |
XPathNavigator::InsertBefore(String) method
Creates a new sibling node before the currently selected node using the XML string specified.
virtual void System::Xml::XPath::XPathNavigator::InsertBefore(String newSibling)
Arguments
| Parameter | Type | Description |
|---|
| newSibling | String | The XML data string for the new sibling node. |
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | The XML string parameter is nullptr. |
| InvalidOperationException | The position of the XPathNavigator does not allow a new sibling node to be inserted before the current node. |
| NotSupportedException | The XPathNavigator does not support editing. |
| XmlException | The XML string parameter is not well-formed. |
XPathNavigator::InsertBefore(SharedPtr<XmlReader>) method
Creates a new sibling node before the currently selected node using the XML contents of the XmlReader object specified.
virtual void System::Xml::XPath::XPathNavigator::InsertBefore(SharedPtr<XmlReader> newSibling)
Arguments
Exceptions
| Exception | Description |
|---|
| ArgumentException | The XmlReader object is in an error state or closed. |
| ArgumentNullException | The XmlReader object parameter is nullptr. |
| InvalidOperationException | The position of the XPathNavigator does not allow a new sibling node to be inserted before the current node. |
| NotSupportedException | The XPathNavigator does not support editing. |
| XmlException | The XML contents of the XmlReader object parameter is not well-formed. |
XPathNavigator::InsertBefore(SharedPtr<XPathNavigator>) method
Creates a new sibling node before the currently selected node using the nodes in the XPathNavigator specified.
virtual void System::Xml::XPath::XPathNavigator::InsertBefore(SharedPtr<XPathNavigator> newSibling)
Arguments
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | The XPathNavigator object parameter is nullptr. |
| InvalidOperationException | The position of the XPathNavigator does not allow a new sibling node to be inserted before the current node. |
| NotSupportedException | The XPathNavigator does not support editing. |
See Also