Share via


removeChild Method (Compact 2013)

3/26/2014

Removes the specified child node from the list of children and returns it.

Syntax

var objXMLDOMNode = oXMLDOMNode.removeChild(childNode);
HRESULT removeChild(
  IXMLDOMNode* childNode,
  IXMLDOMNode** outOldChild
);

Parameters

Script

  • childNode
    Object. Child node to be removed from the list of children of this node.

C/C++

  • childNode
    [in] Child node to be removed from the list of children of this node.
  • outOldChild
    [out, retval] Removed child node. If Null, no object is created.

Return Value

Script

Object. Returns the removed child node.

C/C++

  • S_OK
    Value returned if successful.
  • E_INVALIDARG
    Value returned if oldChild is not a child of this node, when the specified oldChild is read-only and cannot be removed, or when oldChild is Null.
  • E_FAIL
    Value returned if an error occurs.

Remarks

This method applies to the following objects and interfaces:

IXMLDOMAttribute, IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, DOMDocument, IXMLDOMDocumentFragment, IXMLDOMDocumentType, IXMLDOMElement, IXMLDOMEntity, IXMLDOMEntityReference, IXMLDOMNode, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, and IXTLRuntime.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML DOM Methods