Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > XML > XML constructor | |||
public XML(text:String)
Creates a new XML object. You must use the constructor to create an XML object before you call any of the methods of the XML class.
Note: Use the createElement() and createTextNode() methods to add elements and text nodes to an XML document tree.
Availability: ActionScript 1.0; Flash Player 5
text:String - A string; the XML text parsed to create the new XML object.
The following example creates a new, empty XML object:
var my_xml:XML = new XML();
The following example creates an XML object by parsing the XML text specified in the source parameter, and populates the newly created XML object with the resulting XML document tree:
var other_xml:XML = new XML("<state name=\"California\"><city>San Francisco</city></state>");
createElement (XML.createElement method), createTextNode (XML.createTextNode method)
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00002342.html