Xml.nodetype - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

XML.nodeType

Availability
Flash Player 5.
Usage
my_xml.nodeType:Number
Description
Read-only property; a
The
is a numeric value from the NodeType enumeration in the W3C DOM Level 1
nodeType
recommendation: www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html.
The following table lists the values:
Integer value
1
2
3
4
5
6
7
8
9
10
11
12
In Flash Player, the built-in XML class only supports 1 (
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()
1040
Chapter 2: ActionScript Language Reference
value, either 1 for an XML element or 3 for a text node.
nodeType
Defined constant
ELEMENT_NODE
ATTRIBUTE_NODE
TEXT_NODE
CDATA_SECTION_NODE
ENTITY_REFERENCE_NODE
ENTITY_NODE
PROCESSING_INSTRUCTION_NODE
COMMENT_NODE
DOCUMENT_NODE
DOCUMENT_TYPE_NODE
DOCUMENT_FRAGMENT_NODE
NOTATION_NODE
) and 3 (
ELEMENT_NODE
).
TEXT_NODE

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents