User Guide

XML 1301
Example
The following code example uses the
XML.load() method:
// Create a new XML object.
var flooring:XML = new XML();
// Set the ignoreWhite property to true (default value is false).
flooring.ignoreWhite = true;
// After loading is complete, trace the XML object.
flooring.onLoad = function(success) {
trace(flooring);
};
// Load the XML into the flooring object.
flooring.load("flooring.xml");
For the contents of the flooring.xml file, and the output that this example produces, see the
example for the
XML.ignoreWhite property.
See also
ignoreWhite (XML.ignoreWhite property), loaded (XML.loaded property), onLoad
(XML.onLoad handler)
, useCodepage (System.useCodepage property)
loaded (XML.loaded property)
public loaded : Boolean
The property that indicates whether the XML document has successfully loaded. If there is no
custom
onLoad() event handler defined for the XML object, Flash Player sets this property to
true when the document-loading process initiated by the XML.load() call has completed
successfully; otherwise, it is
false. However, if you define a custom behavior for the
onLoad() event handler for the XML object, you must be sure to set onload in that function.
Availability: ActionScript 1.0; Flash Player 5
Example
The following example uses the
XML.loaded property in a simple script.
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean) {
trace("success: "+success);
trace("loaded: "+my_xml.loaded);
trace("status: "+my_xml.status);
};
my_xml.load("http://www.flash-mx.com/mm/problems/products.xml");