MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 1339

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
- An integer representing the node type:
type:Number
Integer value
1
2
3
4
5
6
7
8
9
10
11
12
In Flash Player, the XML class only supports node types 1 (ELEMENT_NODE) and 3
(TEXT_NODE).
- For a text node, this is the text of the node; for an element node, this is the
value:String
contents of the tag.
Example
var ELEMENT_NODE:Number = 1;
var node1:XMLNode = new XMLNode(ELEMENT_NODE, "fullName");
var TEXT_NODE:Number = 3;
var node2:XMLNode = new XMLNode(TEXT_NODE, "Justin Case");
// Create a new XML document
var doc:XML = new XML();
// Create a root node
var rootNode:XMLNode = doc.createElement("root");
// Add the rootNode as the root of the XML document tree
doc.appendChild(rootNode);
// Build the rest of the document:
Defined constant
ELEMENT_NODE
ATTRIBUTE_NODE
TEXT_NODE
CDATA_SECTION_NODE
NTITY_REFERENCE_NODE
ENTITY_NODE
PROCESSING_INSTRUCTION_NO
DE
COMMENT_NODE
DOCUMENT_NODE
DOCUMENT_TYPE_NODE
DOCUMENT_FRAGMENT_NODE
NOTATION_NODE
XMLNode
1339

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents