U-X > XML.load

 

XML.load

Availability

Flash Player 5.

Usage

myXML.load(url)

Parameters

url The URL where the XML document to be loaded is located. The URL must be in the same subdomain as the URL where the movie currently resides.

Returns

Nothing.

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 load process is asynchronous; it does not finish immediately after the load method is executed. When load is executed, the XML object property loaded is set to false. When the XML data finishes downloading, the loaded property is set to true, and the onLoad method is invoked. The XML data is not parsed until it is completely downloaded. If the XML object previously contained any XML trees, they are discarded.

You can specify your own callback function in place of the onLoad method.

Example

The following is a simple example using XML.load:

doc = new XML();
doc.load ("theFile.xml");

See also

XML.loaded, XML.onLoad