Inserts a copy of the node or nodes represented by "obj" into the specified position in this tree relative to the current position and moves the navigator to point at the root of the newly inserted nodes.
[Visual Basic] Overloads MustOverride Public Sub Insert( _ ByVal p As TreePosition, _ ByVal obj As Object, _ ByVal type As Type _ ) [C#] public abstract void Insert( TreePosition p, object obj, Type type ); [C++] public: virtual void Insert( TreePosition p, Object* obj, Type* type ) = 0; [JScript] public abstract function Insert( p : TreePosition, obj : Object, type : Type );
A type of XmlNavigator copies the entire subtree pointed at by the other XmlNavigator object. The other XmlNavigator will not be moved.
Exception Type | Condition |
---|---|
ArgumentException | The object specifies a node with 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 type argument is not one of the above. |
Inserting a subtree into the Parent position results in the current node becoming the first child of the new parent.
XmlNavigator Class | XmlNavigator Members | System.NewXml Namespace | XmlNavigator.Insert Overload List