User Guide
XML class 201
See also
XML.nodeValue
XML.nodeValue
Availability
Flash Media Server 2.
Usage
my_xml.nodeValue
Description
Property; the node value of the XML object. If the XML object is a text node, the nodeType is
3, and the
nodeValue is the text of the node. If the XML object is an XML element
(
nodeType is 1), nodeValue is null and read-only.
Example
The following example creates an element node and a text node and checks the node value of
each:
// Create an XML document.
var doc = new XML();
// Create an XML node using createElement().
var myNode = doc.createElement("rootNode");
// Place the new node into the XML tree.
doc.appendChild(myNode);
// Create an XML text node using createTextNode().
var myTextNode = doc.createTextNode("myTextNode");
// Place the new node into the XML tree.
myNode.appendChild(myTextNode);
trace(myNode.nodeValue);
trace(myTextNode.nodeValue);
/*
output:
null
myTextNode
*/