Element Object
The hasChildNodes() method returns TRUE if the current element node has child nodes, and FALSE otherwise.
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and checks if the first <book> element has any child nodes:
Output:
Element Object
Your message has been sent to W3Schools.