Document Object
The nodeType property returns the node type of a node.
In all examples, we will use the XML file books.xml, and the JavaScript function loadXMLDoc().
The following code fragment displays the node name and node type of the root node:
Output:
Document Object
Your message has been sent to W3Schools.