Logo Search packages:      
Sourcecode: lib-dom-java version File versions  Download package

Node org::w3c::dom::Node::replaceChild ( Node  newChild,
Node  oldChild 
) throws DOMException [inherited]

Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If the newChild is already in the tree, it is first removed.

Parameters:
newChild The new node to put in the child list.
oldChild The node being replaced in the list.
Returns:
The node replaced.
Exceptions:
DOMException HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or it the node to put in is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.


Generated by  Doxygen 1.6.0   Back to index