Createtextnode (Xml.createtextnode Method) - 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

Example
The following example creates three XML nodes using the
method:
createElement()
// create an XML document
var doc:XML = new XML();
// create three XML nodes using createElement()
var element1:XMLNode = doc.createElement("element1");
var element2:XMLNode = doc.createElement("element2");
var element3:XMLNode = doc.createElement("element3");
// place the new nodes into the XML tree
doc.appendChild(element1);
element1.appendChild(element2);
element1.appendChild(element3);
trace(doc);
// output: <element1><element2 /><element3 /></element1>
See also

createTextNode (XML.createTextNode method)

createTextNode (XML.createTextNode method)
public createTextNode(value:String) : XMLNode
Creates a new XML text node with the specified text. The new node initially has no parent,
and text nodes cannot have children or siblings. This method returns a reference to the XML
object that represents the new text node. This method and the
XML.createElement()
method are the constructor methods for creating nodes for an XML object.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- A string; the text used to create the new text node.
value:String
Returns
- An XMLNode object.
XMLNode
722
ActionScript classes

Advertisement

Table of Contents
loading

Table of Contents