Parsexml (Xml.parsexml 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 includes ActionScript for a simple e-commerce storefront application.
The
sendAndLoad()
password, and uses an
var login_str:String = "<login username=\""+username_txt.text+"\"
password=\""+password_txt.text+"\" />";
var my_xml:XML = new XML(login_str);
var myLoginReply_xml:XML = new XML();
myLoginReply_xml.ignoreWhite = true;
myLoginReply_xml.onLoad = function(success:Boolean){
if (success) {
if ((myLoginReply_xml.firstChild.nodeName == "packet") &&
(myLoginReply_xml.firstChild.attributes.success == "true")) {
gotoAndStop("loggedIn");
} else {
gotoAndStop("loginFailed");
}
} else {
gotoAndStop("connectionFailed");
}
};
my_xml.sendAndLoad("http://www.flash-mx.com/mm/login_xml.cfm",
myLoginReply_xml);
See also
load (XML.load method)

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 Lite 2.0
Parameters
- A string that represents the XML text to be parsed and passed to the specified
value:String
XML object.
method transmits an XML element that contains the user's name and
handler to process the reply from the server.
XML.onLoad
,
sendAndLoad (XML.sendAndLoad method)
value
parameter, and populates the specified XML
XML
731

Advertisement

Table of Contents
loading

Table of Contents