Easy Tutorial
❮ Met Cdata Insertdata Xml Dom Examples ❯

XML DOM hasChildNodes() Method



Definition and Usage

The hasChildNodes() method returns TRUE if the current element node has child nodes, otherwise it returns FALSE.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and checks if the first <book> element has child nodes:

Example

Output:


❮ Met Cdata Insertdata Xml Dom Examples ❯