XML.parseXML()
Availability
Flash Player 5.
Usage
my_xml.parseXML(source:String) : Void
Parameters
A string that represents the XML text to be parsed and passed to the specified XML
source
object.
Returns
Nothing.
Description
Method; parses the XML text specified in the
XML object with the resulting XML tree. Any existing trees in the XML object are discarded.
Example
The following example creates and parses an XML packet:
var xml_str:String = "<state name=\"California\">
<city>San Francisco</city></state>"
// defining the XML source within the XML constructor:
var my1_xml:XML = new XML(xml_str);
trace(my1_xml.firstChild.attributes.name); // output: California
// defining the XML source using the XML.parseXML method:
var my2_xml:XML = new XML();
my2_xml.parseXML(xml_str);
trace(my2_xml.firstChild.attributes.name); // output: California
parameter, and populates the specified
source
XML.parseXML() 1047
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?