Parsexml (Xml.parsexml Method); Send (Xml.send Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

See also
load (XML.load method)
statement

parseXML (XML.parseXML method)

public parseXML(value:String) : Void
Parses the XML text specified in the
object with the resulting XML tree. Any existing trees in the XML object are discarded.
Availability: ActionScript 1.0; Flash Player 5
Parameters
- A string that represents the XML text to be parsed and passed to the specified
value:String
XML object.
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

send (XML.send method)

public send(url:String, [target:String], [method:String]) : Boolean
Encodes the specified XML object into an XML document and sends it to the specified
URL.
target
When using this method, consider the Flash Player security model:
For Flash Player 8, the method is not allowed if the calling SWF file is in an untrusted
local sandbox.
For Flash Player 7 and later, the method is not allowed if the calling SWF file is a local file.
1306
ActionScript classes
,
sendAndLoad (XML.sendAndLoad method)
parameter, and populates the specified XML
value
,
function

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents