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.

Modifiers Signature Description<br />

Methods inherited from class Object<br />

appendChild (XMLNode.appendChild method)<br />

public appendChild(newChild:XMLNode) : Void<br />

Appends the specified node to the XML object's child list. This method operates directly on<br />

the node referenced by the childNode parameter; it does not append a copy of the node. If<br />

the node to be appended already exists in another tree structure, appending the node to the<br />

new location will remove it from its current location. If the childNode parameter refers to a<br />

node that already exists in another XML tree structure, the appended child node is placed in<br />

the new tree structure after it is removed from its existing parent node.<br />

Parameters<br />

newChild:XMLNode - An XMLNode that represents the node to be moved from its current<br />

location to the child list of the my_xml object.<br />

Example<br />

This example does the following things in the order shown:<br />

■ Creates two empty XML documents, doc1 <strong>and</strong> doc2.<br />

■ Creates a new node using the createElement() method, <strong>and</strong> appends it, using the<br />

appendChild() method, to the XML document named doc1.<br />

■ Shows how to move a node using the appendChild() method, by moving the root node<br />

from doc1 to doc2.<br />

■ Clones the root node from doc2 <strong>and</strong> appends it to doc1.<br />

■ Creates a new node <strong>and</strong> appends it to the root node of the XML document doc1.<br />

698 ActionScript classes<br />

removeNode() : Void Removes the specified XML object from its parent.<br />

toString() : String Evaluates the specified XML object, constructs a<br />

textual representation of the XML structure,<br />

including the node, children, <strong>and</strong> attributes, <strong>and</strong><br />

returns the result as a string.<br />

addProperty (Object.addProperty method), hasOwnProperty<br />

(Object.hasOwnProperty method), isPropertyEnumerable<br />

(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf<br />

method), registerClass (Object.registerClass method), toString<br />

(Object.toString method), unwatch (Object.unwatch method), valueOf<br />

(Object.valueOf method), watch (Object.watch method)

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

Saved successfully!

Ooh no, something went wrong!