200
Server-Side ActionScript Language Reference
In Flash Player, the built-in XML class supports only 1 (
ELEMENT_NODE
) and 3 (
TEXT_NODE
).
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 = 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.nodeType);
trace(myTextNode.nodeType);
/*
output:
1
3
*/
4
CDATA_SECTION_NODE
5
ENTITY_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
NOT
E
In Flash Media Server, the output of
trace()
statements appears in the application log
file and Application inspector.
Integer value
Defined constant
Содержание FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT...
Страница 1: ...Server Side ActionScript Language Reference...
Страница 4: ...4 Contents...
Страница 228: ...228 Server Side ActionScript Language Reference...
Страница 234: ...234 Server Side Information Objects...