previousSibling (XMLNode.previousSibling property)

public previousSibling : XMLNode [read-only]

An XMLNode value that references the previous sibling in the parent node's child list. The property has a value of null if the node does not have a previous sibling node. This property cannot be used to manipulate child nodes; use the appendChild(), insertBefore(), and removeNode() methods to manipulate child nodes.

Availability: ActionScript 1.0; Flash Player 5

Example

The following example is an excerpt from the example for the XML.lastChild property, and shows how you can use the XML.previousSibling property to loop through an XML node's child nodes:

for (var aNode:XMLNode = rootNode.lastChild; aNode != null; aNode = aNode.previousSibling) {
    trace(aNode);
}

See also

lastChild (XMLNode.lastChild property), appendChild (XMLNode.appendChild method), insertBefore (XMLNode.insertBefore method), removeNode (XMLNode.removeNode method), XML


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00002363.html