Deletes a node of the child's list of the indicated node and return it.

1 dom.node.removeChild

<dom.node.removeChild>
    <node /> !
    <refChild /> !
</dom.node.removeChild>

Returns

NO_MODIFICATION_ALLOWED_ERR

Appears if this node is readonly.

NOT_FOUND_ERR

Appears if refChild is not child of this node.

NOT_SUPPORTED_ERR

If this node is of Document type, this exception can appear if the DOM implementation does not support the elimination of the child DocumentType or of the Element child.

Example

Get the document object associated to the node.

Copy
<xsql-script name='dom_node_removeChild'>

    <body>
        <set name='root'>
            <dom.parse><file name='data1.xml' type='absolute' /></dom.parse>
        </set>

        <set name='node_del'>
            <dom.element.getFirstChildElement><root /></dom.element.getFirstChildElement>
        </set>

        <dom.node.removeChild>
            <root/>
            <node_del/>
        </dom.node.removeChild>

        <!--
Returns the original document without the deleted node:

<document>
    <element>world</element>
</document>
        -->

        <println>
            <root/>
        </println>

    </body>
</xsql-script>