Description
Method; loads an XML document from the specified URL, and replaces the contents of the
specified XML object with the downloaded XML data. The URL is relative and is called using
HTTP. The load process is asynchronous; it does not finish immediately after the
method is executed.
When the
method is executed, the XML object property
load()
When the XML data finishes downloading, the
event handler is invoked. The XML data is not parsed until it is completely
onLoad
downloaded. If the XML object previously contained any XML trees, they are discarded.
You can define a custom function that executes when the
object is invoked.
Example
The following simple example uses the
// Create a new XML object.
var flooring = 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
XML.ignoreWhite
In Flash Media Server, the output of
file and Application inspector.
See also
XML.loaded,
XML.onLoad
192
Server-Side ActionScript Language Reference
loaded
method:
XML.load()
on page
187.
statements appears in the application log
trace()
is set to
loaded
property is set to
true
event handler of the XML
onLoad
load()
.
false
, and the
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?