System.Xml.XPath.XPathNavigator.PrependChild 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 System.Xml.XmlReader object specified.

Syntax

public virtual void PrependChild (System.Xml.XmlReader newChild)

Parameters

newChild
An System.Xml.XmlReader object positioned on the XML data for the new child node.

Remarks

Prepending a child node adds the new node to the beginning of the list of child nodes for the current node. For example, when three child nodes exist for an element, the prepended node becomes the first child node. If no child nodes exist, then a new child node is created.

The following are important notes to consider when using the XPathNavigator.PrependChild(System.Xml.XmlReader) method.

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