IXMLDOMSelection::removeNext Method
Removes the next node that would be returned by peekNode or nextNode.
Visual Basic Syntax
Set objXMLDOMNode = objXMLDOMSelection.removeNext
C/C++ Syntax
HRESULT removeNext(IXMLDOMNode ** ppNode);
Parameters
- ppNode [out]
- The node that was removed, or Null if there is no nextNode to remove. If the parameter is Null, the removed node is not returned, but it is still removed.
C/C++ Return Values
- S_OK
- Value returned if the method is successful.
- S_FALSE
- Value returned if no nodes left in the selection.
- E_PENDING
- Value returned if all nodes cannot be found at this time (in which case no nodes are removed).
Remarks
The removeNext method is equivalent to the following (except that it also works for attributes):
var node = list.peeknode();
node.parentnode.removeChild(node);
The side effect is that the length of the collection is decremented and the nextNode and item methods will not return it because it has been removed.
See Also
IXMLDOMSelection Interface