Easy Tutorial
❮ Met Text Insertdata Dom Attribute ❯

XML DOM length Property



Definition and Usage

The length property returns the number of nodes in the NamedNodeMap.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and retrieves the number of attributes in the first <book> element:

Example

The above code will output:


Try It

length - Return the number of nodes in a node list

length - Loop through nodes in a node list


❮ Met Text Insertdata Dom Attribute ❯