XML DOM - XML DOM NamedNodeMap Object - DOM NamedNodeMap Object length - XML DOM

Explain the length attribute of the NamedNodeMap Object

The number of nodes in the map is provided by the length property of the NamedNodeMap object.

Syntax

The syntax for using the length attribute is as follows:

Example

node.xml contents are as below -

The illustration below displays the length property usage.

Execution

The file is saved as namednodemapproperty_length.htm on the server path and this file should be on the same path as that of node.xml in the server. The output appears as follows:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML DOM Topics