MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 473

Actionscript language reference
Table of Contents

Advertisement

Description
Method; parses the XML text specified in the
XML object with the resulting XML tree. Any existing trees in the XML object are discarded.
Example
The following example creates and parses an XML packet:
var xml_str:String = "<state name=\"California\">
<city>San Francisco</city></state>"
// defining the XML source within the XML constructor:
var my1_xml:XML = new XML(xml_str);
trace(my1_xml.firstChild.attributes.name); // output: California
// defining the XML source using the XML.parseXML method:
var my2_xml:XML = new XML();
my2_xml.parseXML(xml_str);
trace(my2_xml.firstChild.attributes.name); // output: California
XML.previousSibling
Availability
Flash Player 5.
Usage
my_xml.previousSibling:XMLNode
Description
Read-only property; an XMLNode value that references the previous sibling in the parent node's
child list. The property has a value of
property cannot be used to manipulate child nodes; use the
XML.insertBefore()
Example
The following example is an excerpt from the example for the
shows how you can use the
child nodes:
for (var aNode:XMLNode = rootNode.lastChild; aNode != null; aNode =
aNode.previousSibling) {
trace(aNode);
}
See also
XML.appendChild(), XML.insertBefore(), XML.removeNode(),
if the node does not have a previous sibling node. This
null
, and
XML.removeNode()
XML.previousSibling
parameter, and populates the specified
source
XML.appendChild()
methods to manipulate child nodes.
XML.lastChild
property to loop through an XML node's
,
property, and
XMLNode class
XML.previousSibling
473

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents