XML class
Availability
Flash Player 5 (became a native object in Flash Player 6, which improved
performance significantly).
Description
Use the methods and properties of the XML class to load, parse, send, build, and manipulate
XML document trees.
You must use the constructor
the XML class.
An XML document is represented in Flash by the XML class. Each element of the hierarchical
document is represented by an XMLNode object.
Note: The XML and XMLNode objects are modeled after the W3C DOM Level 1 recommendation:
www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html. That recommendation
specifies a Node interface and a Document interface. The Document interface inherits from the Node
interface, and adds methods such as
XML and XMLNode objects are designed to divide functionality along similar lines.
Method summary for the XML class
Method
XML.addRequestHeader()
XML.appendChild()
XML.cloneNode()
XML.createElement()
XML.createTextNode()
XML.getBytesLoaded()
XML.getBytesTotal()
XML.hasChildNodes()
XML.insertBefore()
XML.load()
XML.parseXML()
XML.removeNode()
XML.send()
XML.sendAndLoad()
XML.toString()
to create an XML object before calling any method of
new XML()
createElement()
Description
Adds or changes HTTP headers for
Appends a node to the end of the specified object's child list.
Clones the specified node and, optionally, recursively clones all children.
Creates a new XML element.
Creates a new XML text node.
Returns the number of bytes loaded for the specified XML document.
Returns the size of the XML document, in bytes.
Returns
if the specified node has child nodes; otherwise, returns
true
.
false
Inserts a node in front of an existing node in the specified node's child list.
Loads a document (specified by the XML object) from a URL.
Parses an XML document into the specified XML object tree.
Removes the specified node from its parent.
Sends the specified XML object to a URL.
Sends the specified XML object to a URL, and loads the server response
into another XML object.
Converts the specified node and any children to XML text.
ActionScript Core Classes
and
. In ActionScript, the
createTextNode()
operations.
POST
CHAPTER 6
XML class
445
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?