Easy Tutorial
❮ Xml Dom Examples Met Element Insertbefore ❯

XML DOM length Property



Definition and Usage

The length property returns the number of nodes in a node list.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and retrieves the number of <title> elements:

Example

The above code will output:


Try It Demos

length - Loop through nodes in a node list


❮ Xml Dom Examples Met Element Insertbefore ❯