XML.nodeName
Availability
Flash Media Server 2.
Usage
my_xml.nodeName
Description
Property; a string representing the node name of the XML object. If the XML object is an
XML element (
),
is the name of the tag that represents the node in
nodeType==1
nodeName
the XML file. For example,
is the
of an HTML
tag. If the XML
TITLE
nodeName
TITLE
object is a text node (
),
is
.
nodeType==3
nodeName
null
Example
The following example creates an element node and a text node, and checks the node name 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("textNode");
// Place the new node into the XML tree.
myNode.appendChild(myTextNode);
trace(myNode.nodeName);
trace(myTextNode.nodeName);
/*
output:
rootNode
null
*/
198
Server-Side ActionScript Language Reference
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?