03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

An XMLNode value that references the next sibling in the parent node's child list. This<br />

property is null if the node does not have a next sibling node. This property cannot be used<br />

to manipulate child nodes; use the appendChild(), insertBefore(), <strong>and</strong> removeNode()<br />

methods to manipulate child nodes.<br />

Example<br />

The following example is an excerpt from the example for the XML.firstChild property, <strong>and</strong><br />

shows how you can use the XML.nextSibling property to loop through an XML node's child<br />

nodes:<br />

for (var aNode:XMLNode = rootNode.firstChild; aNode != null; aNode =<br />

aNode.nextSibling) {<br />

trace(aNode);<br />

}<br />

See also<br />

firstChild (XMLNode.firstChild property), appendChild (XMLNode.appendChild<br />

method), insertBefore (XMLNode.insertBefore method), removeNode<br />

(XMLNode.removeNode method), hasXMLSocket (capabilities.hasXMLSocket<br />

property)<br />

nodeName (XMLNode.nodeName property)<br />

public nodeName : String<br />

A string representing the node name of the XML object. If the XML object is an XML<br />

element (nodeType == 1), nodeName is the name of the tag that represents the node in the<br />

XML file. For example, TITLE is the nodeName of an HTML TITLE tag. If the XML object is<br />

a text node (nodeType == 3), nodeName is null.<br />

Example<br />

The following example creates an element node <strong>and</strong> a text node, <strong>and</strong> checks the node name of<br />

each:<br />

// create an XML document<br />

var doc:XML = new XML();<br />

// create an XML node using createElement()<br />

var myNode:XMLNode = doc.createElement("rootNode");<br />

// place the new node into the XML tree<br />

doc.appendChild(myNode);<br />

// create an XML text node using createTextNode()<br />

XMLNode 707

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!