Easy Tutorial
❮ Prop Document Async Prop Node Prefix ❯

XML DOM nodeName Property



Definition and Usage

The nodeName property returns the name of the node, depending on its type.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and displays the node name and node type of the root node:

Example

Output:


Try It

Display the node name and node value of all elements


❮ Prop Document Async Prop Node Prefix ❯