<oldest />
*/
The following example creates a new XML packet and uses the
iterate through the child nodes of the root node:
// create a new XML document
var doc:XML = new XML("<rootNode><oldest /><middle /><youngest /></
rootNode>");
var rootNode:XMLNode = doc.firstChild;
// use lastChild to iterate through the child nodes of rootNode
for (var aNode:XMLNode = rootNode.lastChild; aNode != null;
aNode=aNode.previousSibling) {
trace(aNode);
}
/*
output:
<youngest />
<middle />
<oldest />
*/
See also
XML.appendChild(), XML.insertBefore(), XML.removeNode(),
XML.load()
Availability
Flash Player 5; behavior changed in Flash Player 7.
Usage
my_xml.load(url:String) : Void
Parameters
A string that represents the URL where the XML document to be loaded is located. If the
url
SWF file that issues this call is running in a web browser,
SWF file; for details, see the Description section.
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 URL is relative and is called using
HTTP. The load process is asynchronous; it does not finish immediately after the
is executed.
XML.lastChild
XMLNode class
must be in the same domain as the
url
property to
method
load()
XML.load()
463
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?