From http://www.w3schools.com (Copyright Refsnes Data)
Complete Document Object Reference
The nodeType property returns the node type of a node.
| documentObject.nodeType |
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:
Example
Output:
Try it yourself » |
Complete Document Object Reference
From http://www.w3schools.com (Copyright Refsnes Data)