Easy Tutorial
❮ Dom Prop Document Stricterrorchecking Met Comment Deletedata ❯

XML DOM removeChild() Method



Definition and Usage

The removeChild() method removes a child node.

If successful, the function returns the removed node; if it fails, it returns NULL.

Syntax

Parameter Description
node Required. Specifies the child node to be removed.

Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and removes the child nodes of the first <book> node:

Example

Output:


❮ Dom Prop Document Stricterrorchecking Met Comment Deletedata ❯