MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 1033

Actionscript language reference
Table of Contents

Advertisement

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(),
property to
XML.lastChild
XMLNode class
XML.lastChild 1033

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx

Table of Contents