## EXPORT_SPEC int ixmlNode_replaceChild

## (IXML_Node* nodeptr,
IXML_Node* newChild,
IXML_Node* oldChild,
IXML_Node** returnNode )

> Replaces an existing child Node with a new child Node in the list of children of a Node.

## Documentation

> Replaces an existing child Node with a new child Node in the list of children of a Node. If newChild is already in the tree, it will first be removed. returnNode will contain the oldChild Node, appropriately removed from the tree (i.e. it will no longer have an owner document).

Parameters:
  nodeptr - The parent of the Node which contains the child to replace.
  newChild - The child with which to replace oldChild.
  oldChild - The child to replace with newChild.
  returnNode - Pointer to a Node to place the removed oldChild Node.
Returns:
  [int] An integer representing one of the following:
  - `IXML_SUCCESS`: The operation completed successfully.
  - `IXML_INVALID_PARAMTER: Either nodeptr, newChild, or oldChild is `NULL`.`
  - `IXML_HIERARCHY_REQUEST_ERR`: The newChild is not a type of Node that can be inserted into this tree or newChild is an ancestor of nodePtr.
  - `IXML_WRONG_DOCUMENT_ERR`: newChild was created from a different document than nodeptr.
  - `IXML_NO_MODIFICATION_ALLOWED_ERR`: nodeptr or its parent is read-only.
  - `IXML_NOT_FOUND_ERR`: oldChild is not a child of nodeptr.

Alphabetic index

This page was generated with the help of DOC++.