Node Object
The hasChildNodes() method returns true if a node has any child nodes, otherwise it returns false.
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and returns whether the first <book> element has any child nodes:
Output:
Node Object
Your message has been sent to W3Schools.