XML DOM - DOM Node Object - DOM Node Object Attribute nodeType - XML DOM

Explain the nodeType attribute of the Node Object

The code that represents the type of the underlying object is nodeType.

Syntax

The syntax for using the nodeType attribute is as follows:

Example

node.xml contents are as below −

The illustration below displays the nodeType attribute usage.

Execution

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