MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 138

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 137
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
135
In Flash Player, the built-in XML class supports only 1 (ELEMENT_NODE) and 3 (TEXT_NODE).
Availability
Flash Media Server 2
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 by using createElement().
var myNode = doc.createElement("rootNode");
// Place the new node into the XML tree.
doc.appendChild(myNode);
// Create an XML text node by 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
*/
XML.nodeValue
my_xml.nodeValue
Integer value Defined constant
1
ELEMENT_NODE
2
ATTRIBUTE_NODE
3
TEXT_NODE
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
Vedere la pagina 137
1 2 ... 133 134 135 136 137 138 139 140 141 142 143 ... 154 155

Commenti su questo manuale

Nessun commento