Example
The following example shows how to use
// create a new XML document
var doc:XML = new XML();
// create a root node
var rootNode:XMLNode = doc.createElement("rootNode");
// create three child nodes
var oldest:XMLNode = doc.createElement("oldest");
var middle:XMLNode = doc.createElement("middle");
var youngest:XMLNode = doc.createElement("youngest");
// add the rootNode as the root of the XML document tree
doc.appendChild(rootNode);
// add each of the child nodes as children of rootNode
rootNode.appendChild(oldest);
rootNode.appendChild(middle);
rootNode.appendChild(youngest);
// use firstChild to iterate through the child nodes of rootNode
for (var aNode:XMLNode = rootNode.firstChild; aNode != null; aNode =
aNode.nextSibling) {
trace(aNode);
}
// output:
// <oldest />
// <middle />
// <youngest />
See also
XML.appendChild(), XML.insertBefore(),
XML.getBytesLoaded()
Availability
Flash Player 6.
Usage
my_xml.getBytesLoaded() : Number
Parameters
None.
Returns
An integer that indicates the number of bytes loaded.
to loop through a node's child nodes:
XML.firstChild
XML.removeNode()
XML.getBytesLoaded()
457
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?