Table of Contents

XML.parentNode Property Flash 5

a reference to the immediate ancestor of a node read-only
theNode.parentNode

Description

The parentNode property returns a reference to the node object from which theNode descends in the XML object hierarchy, where theNode can be an XML or XMLnode instance. If theNode is the top (root) node of the current hierarchy, parentNode returns null.

In this XML source fragment, the MESSAGE node is the parentNode of text node "hey":

<MESSAGE>hey</MESSAGE>

Here, the parentNode of the ROOM node is the HOTEL node:

<HOTEL><ROOM><SIZE>Double</SIZE></ROOM></HOTEL>

See Also

XML.childNodes, XML.firstChild, XML.lastChild, XML.previousSibling


Table of Contents