XML DOM - DOM Node Object - DOM Node Object Attribute parentNode - XML DOM

Explain the parentNode attribute of the Node Object

The parentNode of the Node is specified by the parentNode attribute


The syntax for using the parentNode attribute is as follows:


node.xml contents are as below −

The illustration below displays the parentNode attribute usage.


The file is saved as nodeattribute_parentnode.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 © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML DOM Topics