Inserts a copy of the node or nodes represented by the specified object into the specified position and moves to the root of the newly inserted nodes.
[Visual Basic] Overloads Overrides Public Sub Insert( _ ByVal p As TreePosition, _ ByVal obj As Object, _ ByVal type As Type _ ) [C#] public override void Insert( TreePosition p, object obj, Type type ); [C++] public: override void Insert( TreePosition p, Object* obj, Type* type ); [JScript] public override 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.
DocumentNavigator Class | DocumentNavigator Members | System.NewXml Namespace | DocumentNavigator.Insert Overload List