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
using the
method in a browser. The Flash test environment only uses the
POST
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- String; the destination URL for the specified XML object.
url:String
[optional] - String; the browser window to show data that the server returns:
target:String
specifies the current frame in the current window.
_self
■
specifies a new window.
■
_blank
specifies the parent of the current frame.
_parent
■
specifies the top-level frame in the current window.
_top
■
If you do not specify a
-
method:String
Returns
-
Boolean
732
ActionScript classes
parameter, it is the same as specifying
window
method.
GET
.
_self
Need help?
Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers