Nodetype (Xmlnode.nodetype Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

nodeType (XMLNode.nodeType property)

public nodeType :
A
value, either 1 for an XML element or 3 for a text node.
nodeType
The
is a numeric value from the NodeType enumeration in the W3C DOM Level
nodeType
1 recommendation: www.w3.org/tr/1998/REC-DOM-Level-1-19981001/level-one-
core.html. The following table lists the values:
Integer value
Defined constant
1
ELEMENT_NODE
2
ATtrIBUTE_NODE
3
TEXT_NODE
4
CDATA_SECTION_NODE
5
NTITY_REFERENCE_NODE
6
ENTITY_NODE
7
PROCESSING_INStrUCTION_NODE
8
COMMENT_NODE
9
DOCUMENT_NODE
10
DOCUMENT_TYPE_NODE
11
DOCUMENT_FRAGMENT_NODE
12
NOTATION_NODE
In Flash Player, the built-in XML class only supports 1 (
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates an element node and a text node, and checks the node type
of each:
// create an XML document
var doc:XML = new XML();
// create an XML node using createElement()
var myNode:XMLNode = doc.createElement("rootNode");
// place the new node into the XML tree
doc.appendChild(myNode);
// create an XML text node using createTextNode()
752
ActionScript classes
Number
[read-only]
) and 3 (
ELEMENT_NODE
).
TEXT_NODE

Advertisement

Table of Contents
loading

Table of Contents