XML DOM - DOM NodeList Object - DOM NodeList Object Attribute Length - XML DOM

Explain the length attribute of the NodeList Object

The number of nodes in the node list is provided by the length attribute of the NodeList object.


The syntax for using the length attribute is as follows:


node.xml contents are as below -

An XML document node.xml is parsed into XML DOM objectand by using the length attribute the length information is extracted.


The file is saved as nodeattribute_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