NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlNavigator.Insert (TreePosition, XmlNodeType, String, String, String)

Creates a new node and inserts it at the specified position in the tree relative to the current position and moves the navigator to point at this newly inserted node.

[Visual Basic]
Overloads MustOverride Public Sub Insert( _
   ByVal p As TreePosition, _
   ByVal nt As XmlNodeType, _
   ByVal localName As String, _
   ByVal namespaceURI As String, _
   ByVal prefix As String _
)
[C#]
public abstract void Insert(
   TreePosition p,
   XmlNodeType nt,
   string localName,
   string namespaceURI,
   string prefix
);
[C++]
public: virtual void Insert(
   TreePosition p,
   XmlNodeType nt,
   String* localName,
   String* namespaceURI,
   String* prefix
) = 0;
[JScript]
public abstract function Insert(
   p : TreePosition,
   nt : XmlNodeType,
   localName : String,
   namespaceURI : String,
   prefix : String
);

Parameters

p
The relative position of the new node. The position "None" means the new node is not inserted into the tree- but instead is left dangling with no parent. This is the only valid way to create DocumentFragment nodes.
nt
[To be supplied.]
localName
The local name of the new node (if any). For nodes that have no name, this is null.
namespaceURI
The namespace URI for the new node (if any). For nodes that have no name, this is null or empty. Null and String.Empty mean the same thing.
prefix
The namespace prefix of the new node (if any). For nodes that have no name, this is null. You can use the LookupPrefix method to find out what the prefix is for a given namespace URI. The XmlNavigator does not do this automatically for performance reasons. Null and String.Empty mean the same thing.

Exceptions

Exception Type Condition
ArgumentException The nt parameter specifies an XmlNodeType that can not be inserted at position p. For example, if the position specified is "Parent" then the NodeType of the new node cannot be Attribute, CDATA or Text or Comment.

The specified XmlNodeType requires a name and no name was provided.

The XmlNodeType has no Name and a name, namespaceURI, or prefix was provided.

Remarks

TBD--Add NodeType table here.

See Also

XmlNavigator Class | XmlNavigator Members | System.NewXml Namespace | XmlNavigator.Insert Overload List