PrependChild()

XPathNavigator::PrependChild() method

Returns an XmlWriter object used to create a new child node at the beginning of the list of child nodes of the current node.

virtual SharedPtr<XmlWriter> System::Xml::XPath::XPathNavigator::PrependChild()

Return Value

An XmlWriter object used to create a new child node at the beginning of the list of child nodes of the current node.

Exceptions

ExceptionDescription
InvalidOperationExceptionThe current node the XPathNavigator is positioned on does not allow a new child node to be prepended.
NotSupportedExceptionThe XPathNavigator does not support editing.

XPathNavigator::PrependChild(String) method

Creates a new child node at the beginning of the list of child nodes of the current node using the XML string specified.

virtual void System::Xml::XPath::XPathNavigator::PrependChild(String newChild)

Arguments

ParameterTypeDescription
newChildStringThe XML data string for the new child node.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe XML string parameter is nullptr.
InvalidOperationExceptionThe current node the XPathNavigator is positioned on does not allow a new child node to be prepended.
NotSupportedExceptionThe XPathNavigator does not support editing.
XmlExceptionThe XML string parameter is not well-formed.

XPathNavigator::PrependChild(SharedPtr<XmlReader>) method

Creates a new child node at the beginning of the list of child nodes of the current node using the XML contents of the XmlReader object specified.

virtual void System::Xml::XPath::XPathNavigator::PrependChild(SharedPtr<XmlReader> newChild)

Arguments

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

Exceptions

ExceptionDescription
ArgumentExceptionThe XmlReader object is in an error state or closed.
ArgumentNullExceptionThe XmlReader object parameter is nullptr.
InvalidOperationExceptionThe current node the XPathNavigator is positioned on does not allow a new child node to be prepended.
NotSupportedExceptionThe XPathNavigator does not support editing.
XmlExceptionThe XML contents of the XmlReader object parameter is not well-formed.

XPathNavigator::PrependChild(SharedPtr<XPathNavigator>) method

Creates a new child node at the beginning of the list of child nodes of the current node using the nodes in the XPathNavigator object specified.

virtual void System::Xml::XPath::XPathNavigator::PrependChild(SharedPtr<XPathNavigator> newChild)

Arguments

ParameterTypeDescription
newChildSharedPtr<XPathNavigator>An XPathNavigator object positioned on the node to add as the new child node.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe XPathNavigator object parameter is nullptr.
InvalidOperationExceptionThe current node the XPathNavigator is positioned on does not allow a new child node to be prepended.
NotSupportedExceptionThe XPathNavigator does not support editing.

See Also