<?xml version="1.0"?>
<apiPackage id="flash.xml"><apiName>flash.xml</apiName><apiDetail/><apiClassifier id="flash.xml:XMLNode"><apiName>XMLNode</apiName><shortdesc>
 The XMLNode class represents the legacy XML object
 that was present in ActionScript 2.0 and that was renamed in ActionScript 3.0.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode, XMLNode object, built-in class
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The XMLNode class represents the legacy XML object
 that was present in ActionScript 2.0 and that was renamed in ActionScript 3.0.
 In ActionScript 3.0, consider using the new top-level <xref href="../../XML.html">XML</xref>
 class and related classes instead,
 which support E4X (ECMAScript for XML).
 The XMLNode class is present for backward compatibility.
 
 </apiDesc><example conref="examples\XMLDocumentExample.as"> The following example uses the XMLDocument and XMLNode classes
 to parse and format an XML document. Rather than loading an external
 XML file, the example uses the top-level XML class to create an XML document, 
 then parses it. 
<codeblock>
package {
    import flash.display.Sprite;
    import flash.xml.XMLDocument;
    import flash.xml.XMLNode;
    import flash.xml.XMLNodeType;

    public class XMLDocumentExample extends Sprite {
        public function XMLDocumentExample() {
            var result:XMLDocument = new XMLDocument();
            result.ignoreWhite = true;
            result.parseXML(getXMLString());

            var books:Array = parseBooks(result.firstChild);
            trace("books: \n" + books);
        }

        private function parseBooks(node:XMLNode):Array {
            var books:Array = new Array();

            var kids:Array = node.childNodes;
            for each(var item:XMLNode in kids) {
                parseBook(item, books);
            }

            return books;
        }

        private function parseBook(node:XMLNode, books:Array):void {
            var item:Book = new Book();
            item.setPublisher(node.attributes.publisher);
            item.setName(node.attributes.name);
            books.push(item);
        }

        private function getXMLString():String {
            var list:XML = &lt;books&gt;
                                &lt;book publisher="Addison-Wesley" name="Design Patterns" /&gt;
                                &lt;book publisher="Addison-Wesley" name="The Pragmatic Programmer" /&gt;
                                &lt;book publisher="Addison-Wesley" name="Test Driven Development" /&gt;
                                &lt;book publisher="Addison-Wesley" name="Refactoring to Patterns" /&gt;
                                &lt;book publisher="O'Reilly Media" name="The Cathedral &amp; the Bazaar" /&gt;
                                &lt;book publisher="O'Reilly Media" name="Unit Test Frameworks" /&gt;
                            &lt;/books&gt;;
            return list.toXMLString();
        }
    }

}
class Book {
    private var publisher:String;
    private var name:String;

    public function setPublisher(publisher:String):void {
        this.publisher = publisher;
    }

    public function setName(name:String):void {
        this.name = name;
    }

    public function toString():String {
        return "[Book name: " + name + " publisher: " + publisher + "]\n";
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#XML"><linktext>XML</linktext></link><link href="flash.xml.xml#XMLDocument"><linktext>flash.xml.XMLDocument</linktext></link></related-links><apiConstructor id="flash.xml:XMLNode:XMLNode"><apiName>XMLNode</apiName><shortdesc>
 Creates a new XMLNode object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>new XMLNode, new, constructor
 </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>type</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>The node type: either 1 for an XML element or 3 for a text node.
 </apiDesc></apiParam><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The XML text parsed to create the new XMLNode object. 
 
 
 
 
 
 </apiDesc></apiParam></apiConstructorDef><apiDesc>
 Creates a new XMLNode object. You must use the constructor to create an XMLNode object before you 
 call any of the methods of the XMLNode class.
 <p><b>Note: </b>Use the <codeph>createElement()</codeph> and <codeph>createTextNode()</codeph>
 methods to add elements and text nodes to an XML document tree.</p>
 
 </apiDesc></apiConstructorDetail><related-links><link href="flash.xml.xml#XMLDocument/createElement()"><linktext>XMLDocument.createElement()</linktext></link><link href="flash.xml.xml#XMLDocument/createTextNode()"><linktext>XMLDocument.createTextNode()</linktext></link></related-links></apiConstructor><apiOperation id="flash.xml:XMLNode:appendChild"><apiName>appendChild</apiName><shortdesc>
	  
	 Appends the specified node to the XML object's child list.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.appendchild, appendchild
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>node</apiItemName><apiOperationClassifier>flash.xml:XMLNode</apiOperationClassifier><apiDesc>An XMLNode that represents the node to be moved from its current location to the child
	 list of the <codeph>my_xml</codeph> object.
	 
	 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	  
	 Appends the specified node to the XML object's child list. This method operates directly on the
	 node referenced by the <codeph>childNode</codeph> parameter; it does not append a copy of the 
	 node. If the node to be appended already exists in another tree structure, appending the node to the
	 new location will remove it from its current location. If the <codeph>childNode</codeph> 
	 parameter refers to a node that already exists in another XML tree structure, the appended child node
	 is placed in the new tree structure after it is removed from its existing parent node.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.xml:XMLNode:cloneNode"><apiName>cloneNode</apiName><shortdesc>
	  
	 Constructs and returns a new XML node of the same type, name, value, and attributes as the 
	 specified XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.clonenode, clodenode
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An XMLNode Object.
	 
	 
	 
	 </apiDesc><apiOperationClassifier>flash.xml:XMLNode</apiOperationClassifier></apiReturn><apiParam><apiItemName>deep</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiDesc>A Boolean value; if set to <codeph>true</codeph>, the children of the specified XML object will be recursively cloned.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	  
	 Constructs and returns a new XML node of the same type, name, value, and attributes as the 
	 specified XML object. If <codeph>deep</codeph> is set to <codeph>true</codeph>, all child nodes are
	 recursively cloned, resulting in an exact copy of the original object's document tree. 
	 <p>The clone of the node that is returned is no longer associated with the tree of the cloned item. 
	 Consequently, <codeph>nextSibling</codeph>, <codeph>parentNode</codeph>, and <codeph>previousSibling</codeph> 
	 all have a value of <codeph>null</codeph>. If the <codeph>deep</codeph> parameter is set to 
	 <codeph>false</codeph>, or the <codeph>my_xml</codeph> node has no child nodes, 
	 <codeph>firstChild</codeph> and <codeph>lastChild</codeph> are also null.</p>
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.xml:XMLNode:getNamespaceForPrefix"><apiName>getNamespaceForPrefix</apiName><shortdesc>
	 Returns the namespace URI that is associated with the specified prefix for the node.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><refpath>
	 </refpath></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The namespace that is associated with the specified prefix. 
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>prefix</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The prefix for which the method returns the associated namespace.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns the namespace URI that is associated with the specified prefix for the node. To determine
	 the URI, <codeph>getPrefixForNamespace()</codeph> searches up the XML hierarchy from the node, as 
	 necessary, and returns the namespace URI of the first <codeph>xmlns</codeph> declaration for the
	 given <codeph>prefix</codeph>.
	 
	 <p>If no namespace is defined for the specified prefix, the method returns <codeph>null</codeph>.</p>
	 
	 <p>If you specify an empty string (<codeph>""</codeph>) as the <codeph>prefix</codeph> and there is a 
	 default namespace defined for the node (as in <codeph>xmlns="http://www.example.com/"</codeph>), 
	 the method returns that default namespace URI.
	 </p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.xml.xml#XMLNode/getPrefixForNamespace()"><linktext>XMLNode.getPrefixForNamespace()</linktext></link><link href="flash.xml.xml#XMLNode/namespaceURI"><linktext>XMLNode.namespaceURI</linktext></link></related-links></apiOperation><apiOperation id="flash.xml:XMLNode:getPrefixForNamespace"><apiName>getPrefixForNamespace</apiName><shortdesc>
	 Returns the prefix that is associated with the specified namespace URI for the node.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The prefix associated with the specified namespace. 
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>ns</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The namespace URI for which the method returns the associated prefix.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns the prefix that is associated with the specified namespace URI for the node. To determine
	 the prefix, <codeph>getPrefixForNamespace()</codeph> searches up the XML hierarchy from the node, as 
	 necessary, and returns the prefix of the first <codeph>xmlns</codeph> declaration with a namespace URI
	 that matches <codeph>ns</codeph>.
	 
	 <p>If there is no <codeph>xmlns</codeph> 
	 assignment for the given URI, the method returns <codeph>null</codeph>. If there is an  
	 <codeph>xmlns</codeph> assignment for the given URI but no prefix is associated with the assignment, 
	 the method returns an empty string 
	 (<codeph>""</codeph>).
	 </p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.xml.xml#XMLNode/getNamespaceForPrefix()"><linktext>XMLNode.getNamespaceForPrefix()</linktext></link><link href="flash.xml.xml#XMLNode/namespaceURI"><linktext>XMLNode.namespaceURI</linktext></link></related-links></apiOperation><apiOperation id="flash.xml:XMLNode:hasChildNodes"><apiName>hasChildNodes</apiName><shortdesc>
	 Indicates whether the specified XMLNode object has child nodes.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.haschildnodes, haschildnodes, has child nodes
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>Returns <codeph>true</codeph> if the
	 specified XMLNode object has child nodes; otherwise, <codeph>false</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Indicates whether the specified XMLNode object has child nodes. This property is <codeph>true</codeph> if the
	 specified XMLNode object has child nodes; otherwise, it is <codeph>false</codeph>.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.xml:XMLNode:insertBefore"><apiName>insertBefore</apiName><shortdesc>
	 Inserts a new child node into the XML object's child list, before the 
	 beforeNode node.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.insertbefore, insertbefore, insert before
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>node</apiItemName><apiOperationClassifier>flash.xml:XMLNode</apiOperationClassifier><apiDesc>The XMLNode object to be inserted.
	 </apiDesc></apiParam><apiParam><apiItemName>before</apiItemName><apiOperationClassifier>flash.xml:XMLNode</apiOperationClassifier><apiDesc>The XMLNode object before the insertion point for the <codeph>childNode</codeph>.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Inserts a new child node into the XML object's child list, before the 
	 <codeph>beforeNode</codeph> node. If the <codeph>beforeNode</codeph> parameter is undefined
	 or null, the node is added using the <codeph>appendChild()</codeph> method. If <codeph>beforeNode</codeph>
	 is not a child of <codeph>my_xml</codeph>, the insertion fails.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.xml.xml#XMLNode/cloneNode()"><linktext>XMLNode.cloneNode()</linktext></link></related-links></apiOperation><apiOperation id="flash.xml:XMLNode:removeNode"><apiName>removeNode</apiName><shortdesc>
	 Removes the specified XML object from its parent.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.removenode, removenode, remove node
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Removes the specified XML object from its parent. Also deletes all descendants of the node.
	 
	 
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.xml:XMLNode:toString"><apiName>toString</apiName><shortdesc>
	 Evaluates the specified XMLNode object, constructs a textual representation of the XML structure,
	 including the node, children, and attributes, and returns the result as a string.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.tostring, tostring
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The string representing the XMLNode object.
	 
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Evaluates the specified XMLNode object, constructs a textual representation of the XML structure,
	 including the node, children, and attributes, and returns the result as a string. 
	 
	 <p>For top-level XMLDocument objects (those created with the constructor), 
	 the <codeph>XMLDocument.toString()</codeph> method outputs the document's XML declaration
	 (stored in the <codeph>XMLDocument.xmlDecl</codeph> property), followed by the document's
	 <codeph>DOCTYPE</codeph> declaration (stored in the <codeph>XMLDocument.docTypeDecl</codeph> property),
	 followed by the text representation of all XML nodes in the object. The XML declaration is not
	 output if the <codeph>XMLDocument.xmlDecl</codeph> property is <codeph>null</codeph>. 
	 The <codeph>DOCTYPE</codeph> declaration is not output if the 
	 <codeph>XMLDocument.docTypeDecl</codeph> property is <codeph>null</codeph>.</p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.xml.xml#XMLDocument/docTypeDecl"><linktext>XMLDocument.docTypeDecl</linktext></link><link href="flash.xml.xml#XMLDocument/xmlDecl"><linktext>XMLDocument.xmlDecl</linktext></link></related-links></apiOperation><apiValue id="flash.xml:XMLNode:firstChild"><apiName>firstChild</apiName><shortdesc>
	 Evaluates the specified XMLDocument object and references the first child in the parent node's child list.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.firstchild, first child
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>flash.xml:XMLNode</apiValueClassifier></apiValueDef><apiDesc>
	 Evaluates the specified XMLDocument object and references the first child in the parent node's child list. 
	 This property is <codeph>null</codeph> if the node does not have children. This property is 
	 <codeph>undefined</codeph> if the node is a text node. This is a read-only property and cannot be used 
	 to manipulate child nodes; use the <codeph>appendChild()</codeph>, <codeph>insertBefore()</codeph>, and 
	 <codeph>removeNode()</codeph> methods to manipulate child nodes.
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/appendChild()"><linktext>XMLNode.appendChild()</linktext></link><link href="flash.xml.xml#XMLNode/insertBefore()"><linktext>XMLNode.insertBefore()</linktext></link><link href="flash.xml.xml#XMLNode/removeNode()"><linktext>XMLNode.removeNode()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:lastChild"><apiName>lastChild</apiName><shortdesc>
	 An XMLNode value that references the last child in the node's child list.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.lastchild, lastchild, last child
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>flash.xml:XMLNode</apiValueClassifier></apiValueDef><apiDesc>
	 An XMLNode value that references the last child in the node's child list. The 
	 <codeph>XMLNode.lastChild</codeph> property is <codeph>null</codeph> if the node does not have children.
	 This property cannot be used to manipulate child nodes; use the <codeph>appendChild()</codeph>, 
	 <codeph>insertBefore()</codeph>, and <codeph>removeNode()</codeph> methods to manipulate child nodes.
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/appendChild()"><linktext>XMLNode.appendChild()</linktext></link><link href="flash.xml.xml#XMLNode/insertBefore()"><linktext>XMLNode.insertBefore()</linktext></link><link href="flash.xml.xml#XMLNode/removeNode()"><linktext>XMLNode.removeNode()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:nextSibling"><apiName>nextSibling</apiName><shortdesc>
	 An XMLNode value that references the next sibling in the parent node's child list.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.nextsibling, next sibling
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>flash.xml:XMLNode</apiValueClassifier></apiValueDef><apiDesc>
	 An XMLNode value that references the next sibling in the parent node's child list. This property is 
	 <codeph>null</codeph> if the node does not have a next sibling node. This property cannot be used to 
	 manipulate child nodes; use the <codeph>appendChild()</codeph>, <codeph>insertBefore()</codeph>, and 
	 <codeph>removeNode()</codeph> methods to manipulate child nodes.
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/firstChild"><linktext>XMLNode.firstChild</linktext></link><link href="flash.xml.xml#XMLNode/appendChild()"><linktext>XMLNode.appendChild()</linktext></link><link href="flash.xml.xml#XMLNode/insertBefore()"><linktext>XMLNode.insertBefore()</linktext></link><link href="flash.xml.xml#XMLNode/removeNode()"><linktext>XMLNode.removeNode()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:nodeName"><apiName>nodeName</apiName><shortdesc>
	 A string representing the node name of the XMLNode object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.nodename, node name
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 A string representing the node name of the XMLNode object. If the XMLNode object is an XML 
	 element (<codeph>nodeType == 1</codeph>), <codeph>nodeName</codeph> is the name of the tag that 
	 represents the node in the XML file. For example, <codeph>TITLE</codeph> is the <codeph>nodeName</codeph>
	 of an HTML <codeph>TITLE</codeph> tag. If the XMLNode object is a text node 
	 (<codeph>nodeType == 3</codeph>), nodeName is <codeph>null</codeph>.
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/nodeType"><linktext>XMLNode.nodeType</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:nodeType"><apiName>nodeType</apiName><shortdesc>
	 A nodeType constant value, either XMLNodeType.ELEMENT_NODE for an XML element or
	 XMLNodeType.TEXT_NODE for a text node.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML.nodetype, node type
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
	 A <codeph>nodeType</codeph> constant value, either <codeph>XMLNodeType.ELEMENT_NODE</codeph> for an XML element or
	 <codeph>XMLNodeType.TEXT_NODE</codeph> for a text node. 
	 <p>The <codeph>nodeType</codeph> is a numeric value from the NodeType enumeration in the W3C DOM 
	 Level 1 recommendation: 
	 <xref href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html" scope="external">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html</xref>.
	 The following table lists the values:</p>
	 <p><adobetable><row><entry>4</entry><entry>CDATA_SECTION_NODE</entry></row>
	 
	 
	 
	 
	 <tgroup cols="2"><thead><row><entry align="left">Integer value</entry><entry align="left">Defined
	 constant</entry></row></thead><tbody><row><entry>1</entry><entry>ELEMENT_NODE</entry></row><row><entry>3</entry><entry>TEXT_NODE</entry></row><row><entry>5</entry><entry>ENTITY_REFERENCE_NODE</entry></row><row><entry>7</entry><entry>PROCESSING_INSTRUCTION_NODE</entry></row><row><entry>9</entry><entry>DOCUMENT_NODE</entry></row><row><entry>11</entry><entry>DOCUMENT_FRAGMENT_NODE</entry></row></tbody></tgroup></adobetable></p>
	 <p>In Flash Player, the built-in XMLNode class only supports <codeph>XMLNodeType.ELEMENT_NODE</codeph> and 
	 <codeph>XMLNodeType.TEXT_NODE</codeph>.</p>
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNodeType/TEXT_NODE"><linktext>XMLNodeType.TEXT_NODE</linktext></link><link href="flash.xml.xml#XMLNodeType/ELEMENT_NODE"><linktext>XMLNodeType.ELEMENT_NODE</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:nodeValue"><apiName>nodeValue</apiName><shortdesc>
	 The node value of the XMLDocument object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.nodevalue, nodevalue, node value
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 The node value of the XMLDocument object. If the XMLDocument object is a text node, the <codeph>nodeType</codeph> 
	 is 3, and the <codeph>nodeValue</codeph> is the text of the node. If the XMLDocument object is an XML element
	 (<codeph>nodeType</codeph> is 1), <codeph>nodeValue</codeph> is <codeph>null</codeph> and read-only.
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/nodeType"><linktext>XMLNode.nodeType</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:parentNode"><apiName>parentNode</apiName><shortdesc>
	 An XMLNode value that references the parent node of the specified XML object, or returns 
	 null if the node has no parent.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.parentnode, parentnode, parent node
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>flash.xml:XMLNode</apiValueClassifier></apiValueDef><apiDesc>
	 An XMLNode value that references the parent node of the specified XML object, or returns 
	 <codeph>null</codeph> if the node has no parent. This is a read-only property and cannot be used to 
	 manipulate child nodes; use the <codeph>appendChild()</codeph>, <codeph>insertBefore()</codeph>, and 
	 <codeph>removeNode()</codeph> methods to manipulate child nodes.
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/appendChild()"><linktext>XMLNode.appendChild()</linktext></link><link href="flash.xml.xml#XMLNode/insertBefore()"><linktext>XMLNode.insertBefore()</linktext></link><link href="flash.xml.xml#XMLNode/removeNode()"><linktext>XMLNode.removeNode()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:previousSibling"><apiName>previousSibling</apiName><shortdesc>
	 An XMLNode value that references the previous sibling in the parent node's child list.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.previousSibling, previousSibling
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>flash.xml:XMLNode</apiValueClassifier></apiValueDef><apiDesc>
	 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 <codeph>appendChild()</codeph>, 
	 <codeph>insertBefore()</codeph>, and <codeph>removeNode()</codeph> methods to manipulate child nodes.
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/lastChild"><linktext>XMLNode.lastChild</linktext></link><link href="flash.xml.xml#XMLNode/appendChild()"><linktext>XMLNode.appendChild()</linktext></link><link href="flash.xml.xml#XMLNode/insertBefore()"><linktext>XMLNode.insertBefore()</linktext></link><link href="flash.xml.xml#XMLNode/removeNode()"><linktext>XMLNode.removeNode()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:attributes:get"><apiName>attributes</apiName><shortdesc>
	 An object containing all of the attributes of the specified XMLNode instance.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.attributes, attributes
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Object</apiValueClassifier></apiValueDef><apiDesc>
	 An object containing all of the attributes of the specified XMLNode instance. The 
	 XMLNode.attributes object contains one variable for each attribute of the XMLNode instance. 
	 Because these variables are defined as part of the object, they are generally referred to as 
	 properties of the object. The value of each attribute is stored in the corresponding property as a 
     string. For example, if you have an attribute named <codeph>color</codeph>, you would retrieve 
     that attribute's value
	 by specifying <codeph>color</codeph> as the property name, as the following code shows: 
	 <pre>
	 var myColor:String = doc.firstChild.attributes.color
	 </pre>
	 
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.xml:XMLNode:childNodes:get"><apiName>childNodes</apiName><shortdesc>
	 An array of the specified XMLNode object's children.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLNode.childnodes, childnodes
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Array</apiValueClassifier></apiValueDef><apiDesc>
	 An array of the specified XMLNode object's children. Each element in the array is a reference
	 to an XMLNode object that represents a child node. This is a read-only property and cannot be
	 used to manipulate child nodes. Use the <codeph>appendChild()</codeph>, <codeph>insertBefore()</codeph>,
	 and <codeph>removeNode()</codeph>  methods to manipulate child nodes. 
	 
	 <p>This property is undefined for text nodes (<codeph>nodeType == 3</codeph>).</p>
	 
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/nodeType"><linktext>XMLNode.nodeType</linktext></link><link href="flash.xml.xml#XMLNode/appendChild()"><linktext>XMLNode.appendChild()</linktext></link><link href="flash.xml.xml#XMLNode/insertBefore()"><linktext>XMLNode.insertBefore()</linktext></link><link href="flash.xml.xml#XMLNode/removeNode()"><linktext>XMLNode.removeNode()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:localName:get"><apiName>localName</apiName><shortdesc>
	 The local name portion of the XML node's name.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 The local name portion of the XML node's name. This is the element name without 
	 the namespace prefix. For example, the node 
	 <codeph>&lt;contact:mailbox/&gt;bob@example.com&lt;/contact:mailbox&gt;</codeph> 
	 has the local name "mailbox", and the prefix "contact", which comprise the full 
	 element name "contact.mailbox".
	 
	 <p>You can access the namespace prefix through the <codeph>prefix</codeph> property of 
	 the XML node object. The <codeph>nodeName</codeph> property returns the full name 
	 (including the prefix and the local name).</p>
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.xml:XMLNode:namespaceURI:get"><apiName>namespaceURI</apiName><shortdesc>
	 If the XML node has a prefix, namespaceURI is the value of the xmlns 
	 declaration for that prefix (the URI), which is typically called the namespace URI.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier><apiTipTexts><apiTipText>The URI of the namespace to which the XML node's prefix resolves. 
	 
	 </apiTipText></apiTipTexts></apiValueDef><apiDesc>
	 If the XML node has a prefix, <codeph>namespaceURI</codeph> is the value of the <codeph>xmlns</codeph> 
	 declaration for that prefix (the URI), which is typically called the namespace URI.
	 The <codeph>xmlns</codeph> declaration is in the current node or in a node higher in the XML 
	 hierarchy. 
	 
	 <p>If the XML node does not have a prefix, the value of the <codeph>namespaceURI</codeph> property
	 depends on whether there is a default namespace defined (as in 
	 <codeph>xmlns="http://www.example.com/"</codeph>). If there is a default namespace, the value of 
	 the <codeph>namespaceURI</codeph> property is the value of the default namespace.
	 If there is no default namespace, the <codeph>namespaceURI</codeph> property for
	 that node is an empty string (<codeph>""</codeph>).</p>
	 
	 <p>You can use the <codeph>getNamespaceForPrefix()</codeph> method to identify the namespace associated with a 
	 specific prefix. The <codeph>namespaceURI</codeph> property returns the prefix associated with the node name.</p>
	 
	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/getNamespaceForPrefix()"><linktext>getNamespaceForPrefix()</linktext></link><link href="flash.xml.xml#XMLNode/getPrefixForNamespace()"><linktext>getPrefixForNamespace()</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNode:prefix:get"><apiName>prefix</apiName><shortdesc>
	 The prefix portion of the XML node name.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	 The prefix portion of the XML node name. For example, the node 
	 <codeph>&lt;contact:mailbox/&gt;bob@example.com&lt;/contact:mailbox&gt;</codeph> prefix 
	 "contact" and the local name "mailbox", which comprise the full element name "contact.mailbox".
	 
	 <p>The <codeph>nodeName</codeph> property of an XML node object returns the full name 
	 (including the prefix and the  local name). You can access the local name portion of the 
	 element's name via the <codeph>localName</codeph> property. </p>
	 
	 
	 </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="flash.xml:XMLNodeType"><apiName>XMLNodeType</apiName><shortdesc>
 The XMLNodeType class contains constants used with 
 XMLNode.nodeType.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The XMLNodeType class contains constants used with 
 <codeph>XMLNode.nodeType</codeph>. The values are defined
 by the NodeType enumeration in the
 W3C DOM Level 1 recommendation: 
 <xref href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html" scope="external">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html</xref>
 
 </apiDesc></apiClassifierDetail><related-links><link href="flash.xml.xml#XMLNode/nodeType"><linktext>XMLNode.nodeType</linktext></link></related-links><apiValue id="flash.xml:XMLNodeType:ELEMENT_NODE"><apiName>ELEMENT_NODE</apiName><shortdesc>
 	 Specifies that the node is an element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>1</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
 	 Specifies that the node is an element.
 	 This constant is used with <codeph>XMLNode.nodeType</codeph>. 
 	 The value is defined by the NodeType enumeration in the
 	 W3C DOM Level 1 recommendation: 
 	 <xref href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html" scope="external">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html</xref>
 	 
 	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/nodeType"><linktext>XMLNode.nodeType</linktext></link></related-links></apiValue><apiValue id="flash.xml:XMLNodeType:TEXT_NODE"><apiName>TEXT_NODE</apiName><shortdesc>
	 Specifies that the node is a text node.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>3</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
	 Specifies that the node is a text node.
	 This constant is used with <codeph>XMLNode.nodeType</codeph>. 
	 The value is defined by the NodeType enumeration in the
	 W3C DOM Level 1 recommendation: 
	 <xref href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html" scope="external">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html</xref>
 	 
 	 </apiDesc></apiValueDetail><related-links><link href="flash.xml.xml#XMLNode/nodeType"><linktext>XMLNode.nodeType</linktext></link></related-links></apiValue></apiClassifier><apiClassifier id="flash.xml:XMLDocument"><apiName>XMLDocument</apiName><shortdesc>
 The XMLDocument class represents the legacy XML object
 that was present in ActionScript 2.0.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>flash.xml:XMLNode</apiBaseClassifier></apiClassifierDef><apiDesc>
 The XMLDocument class represents the legacy XML object
 that was present in ActionScript 2.0. It was renamed in ActionScript 3.0
 to XMLDocument to avoid name conflicts with the new
 XML class in ActionScript 3.0. In ActionScript 3.0,
 it is recommended that you use the new 
 <xref href="../../XML.html">XML</xref> class and related classes,
 which support E4X (ECMAScript for XML).
 
 <p>The XMLDocument class, as well as XMLNode and XMLNodeType, are present for backward
 compatibility. The functionality for loading XML documents can now be found in the
 URLLoader class.</p>
 
 </apiDesc><example conref="examples\XMLDocumentExample.as"> The following example uses the XMLDocument and XMLNode classes
 to parse and format an XML document. Rather than loading an external
 XML file, the example uses the top-level XML class to create an XML document, 
 then parses it. 
<codeblock>
package {
    import flash.display.Sprite;
    import flash.xml.XMLDocument;
    import flash.xml.XMLNode;
    import flash.xml.XMLNodeType;

    public class XMLDocumentExample extends Sprite {
        public function XMLDocumentExample() {
            var result:XMLDocument = new XMLDocument();
            result.ignoreWhite = true;
            result.parseXML(getXMLString());

            var books:Array = parseBooks(result.firstChild);
            trace("books: \n" + books);
        }

        private function parseBooks(node:XMLNode):Array {
            var books:Array = new Array();

            var kids:Array = node.childNodes;
            for each(var item:XMLNode in kids) {
                parseBook(item, books);
            }

            return books;
        }

        private function parseBook(node:XMLNode, books:Array):void {
            var item:Book = new Book();
            item.setPublisher(node.attributes.publisher);
            item.setName(node.attributes.name);
            books.push(item);
        }

        private function getXMLString():String {
            var list:XML = &lt;books&gt;
                                &lt;book publisher="Addison-Wesley" name="Design Patterns" /&gt;
                                &lt;book publisher="Addison-Wesley" name="The Pragmatic Programmer" /&gt;
                                &lt;book publisher="Addison-Wesley" name="Test Driven Development" /&gt;
                                &lt;book publisher="Addison-Wesley" name="Refactoring to Patterns" /&gt;
                                &lt;book publisher="O'Reilly Media" name="The Cathedral &amp; the Bazaar" /&gt;
                                &lt;book publisher="O'Reilly Media" name="Unit Test Frameworks" /&gt;
                            &lt;/books&gt;;
            return list.toXMLString();
        }
    }

}
class Book {
    private var publisher:String;
    private var name:String;

    public function setPublisher(publisher:String):void {
        this.publisher = publisher;
    }

    public function setName(name:String):void {
        this.name = name;
    }

    public function toString():String {
        return "[Book name: " + name + " publisher: " + publisher + "]\n";
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="flash.net.xml#URLLoader"><linktext>flash.net.URLLoader</linktext></link><link href="#XML"><linktext>XML class</linktext></link></related-links><apiConstructor id="flash.xml:XMLDocument:XMLDocument"><apiName>XMLDocument</apiName><shortdesc>
	 Creates a new XMLDocument object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates a new, empty XMLDocument object:
	 <listing>
	 var my_xml:XML = new XML();
	 </listing>
	 <p>The following example creates an XML object by parsing the XML text specified in the <code>source</code> parameter, and populates the newly created XML object with the resulting XML document tree:</p>
	 <listing>
	 var other_xml:XML = new XML("&lt;state name=\"California\"&gt;&lt;city&gt;San Francisco&lt;/city&gt;&lt;/state&gt;");
	 </listing>
	 
	 </maelexample></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>source</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData>null</apiData><apiDesc>The XML text parsed to create the new XMLDocument object. 
	 
	 </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new XMLDocument object. You must use the constructor to create an XMLDocument object before you call any of the methods of the XMLDocument class.
	 <p><b>Note: </b>Use the <codeph>createElement()</codeph> and <codeph>createTextNode()</codeph> methods to add elements and text nodes to an XML document tree.</p>
	 
	 </apiDesc></apiConstructorDetail><related-links><link href="flash.xml.xml#XMLDocument/createElement()"><linktext>XMLDocument.createElement()</linktext></link><link href="flash.xml.xml#XMLDocument/createTextNode()"><linktext>XMLDocument.createTextNode()</linktext></link></related-links></apiConstructor><apiOperation id="flash.xml:XMLDocument:createElement"><apiName>createElement</apiName><shortdesc>
	 Creates a new XMLNode object with the name specified in the parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates three XML nodes using the <code>createElement()</code> method:
	 <listing>
	 // create an XML document
	 var doc:XML = new XML();
	 
	 // create three XML nodes using createElement()
	 var element1:XMLNode = doc.createElement("element1");
	 var element2:XMLNode = doc.createElement("element2");
	 var element3:XMLNode = doc.createElement("element3");
	 
	 // place the new nodes into the XML tree
	 doc.appendChild(element1);
	 element1.appendChild(element2);
	 element1.appendChild(element3);
	 
	 trace(doc);
	 // output: &lt;element1&gt;&lt;element2 /&gt;&lt;element3 /&gt;&lt;/element1&gt;
	 </listing>
	 
	 </maelexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An XMLNode object.
	 
	 </apiDesc><apiOperationClassifier>flash.xml:XMLNode</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The tag name of the XMLDocument element being created.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Creates a new XMLNode object with the name specified in the parameter. 
	 The new node initially has no parent, no children, and no siblings. 
	 The method returns a reference to the newly created XMLNode object
	 that represents the element. This method and the <codeph>XMLDocument.createTextNode()</codeph>
	 method are the constructor methods for creating nodes for an XMLDocument object.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.xml.xml#XMLDocument/createTextNode()"><linktext>XMLDocument.createTextNode()</linktext></link></related-links></apiOperation><apiOperation id="flash.xml:XMLDocument:createTextNode"><apiName>createTextNode</apiName><shortdesc>
	 Creates a new XML text node with the specified text.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates two XML text nodes using the <code>createTextNode()</code> method, and places them into existing XML nodes:
	 <listing>
	 // create an XML document
	 var doc:XML = new XML();
	 
	 // create three XML nodes using createElement()
	 var element1:XMLNode = doc.createElement("element1");
	 var element2:XMLNode = doc.createElement("element2");
	 var element3:XMLNode = doc.createElement("element3");
	 
	 // place the new nodes into the XML tree
	 doc.appendChild(element1);
	 element1.appendChild(element2);
	 element1.appendChild(element3);
	 
	 // create two XML text nodes using createTextNode()
	 var textNode1:XMLNode = doc.createTextNode("textNode1 String value");
	 var textNode2:XMLNode = doc.createTextNode("textNode2 String value");
	 
	 // place the new nodes into the XML tree
	 element2.appendChild(textNode1);
	 element3.appendChild(textNode2);
	 
	 trace(doc);
	 // output (with line breaks added between tags):
	 // &lt;element1&gt;
	 //    &lt;element2&gt;textNode1 String value&lt;/element2&gt;
	 //    &lt;element3&gt;textNode2 String value&lt;/element3&gt;
	 // &lt;/element1&gt;
	 </listing>
	 
	 
	 </maelexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An XMLNode object.
	 
	 </apiDesc><apiOperationClassifier>flash.xml:XMLNode</apiOperationClassifier></apiReturn><apiParam><apiItemName>text</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The text used to create the new text node.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Creates a new XML text node with the specified text. The new node initially has no parent, and text nodes cannot have children or siblings. This method returns a reference to the XMLDocument object that represents the new text node. This method and the <codeph>XMLDocument.createElement()</codeph> method are the constructor methods for creating nodes for an XMLDocument object.
	 
	 
	 </apiDesc></apiOperationDetail><related-links><link href="flash.xml.xml#XMLDocument/createElement()"><linktext>XMLDocument.createElement()</linktext></link></related-links></apiOperation><apiOperation id="flash.xml:XMLDocument:parseXML"><apiName>parseXML</apiName><shortdesc>
	 Parses the XML text specified in the value parameter
     and populates the specified XMLDocument object with the resulting XML tree.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates and parses an XML packet:
	 <listing>
	 var xml_str:String = "&lt;state name=\"California\"&gt;
	 &lt;city&gt;San Francisco&lt;/city&gt;&lt;/state&gt;"
	 
	 // 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
	 </listing>
	 
	 </maelexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>source</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The XML text to be parsed and passed to the specified XMLDocument object.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Parses the XML text specified in the <codeph>value</codeph> parameter
     and populates the specified XMLDocument object with the resulting XML tree. Any existing trees in the XMLDocument object are discarded.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="flash.xml:XMLDocument:toString"><apiName>toString</apiName><shortdesc>
	 Returns a string representation of the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiIsOverride/><apiReturn><apiDesc>A string representation of the XML object.
 	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a string representation of the XML object.
	 
 	 </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.xml:XMLDocument:docTypeDecl"><apiName>docTypeDecl</apiName><shortdesc>
	 Specifies information about the XML document's DOCTYPE declaration.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example uses the <code>XML.docTypeDecl</code> property to set the <code>DOCTYPE</code> declaration for an XML object:
	 <listing>
	 <code><em>my_xml</em></code>.<code>docTypeDecl = "&lt;!DOCTYPE greeting SYSTEM \"hello.dtd\"&gt;";</code>
	 </listing>
	 </maelexample></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiData>null</apiData><apiValueClassifier>Object</apiValueClassifier></apiValueDef><apiDesc>
	 Specifies information about the XML document's <codeph>DOCTYPE</codeph> declaration. 
	 After the XML text has been parsed into an XMLDocument object, the 
	 <codeph>XMLDocument.docTypeDecl</codeph> property of the XMLDocument object is set to the 
	 text of the XML document's <codeph>DOCTYPE</codeph> declaration 
	 (for example, <codeph>&lt;!DOCTYPE</codeph> <codeph>greeting SYSTEM "hello.dtd"&gt;</codeph>). 
	 This property is set using a string representation of the <codeph>DOCTYPE</codeph> declaration, 
	 not an XMLNode object.
	 <p>The legacy ActionScript XML parser is not a validating parser. The <codeph>DOCTYPE</codeph> 
	 declaration is read by the parser and stored in the <codeph>XMLDocument.docTypeDecl</codeph> property,
	 but no DTD validation is performed.</p>
	 <p>If no <codeph>DOCTYPE</codeph> declaration was encountered during a parse operation, 
	 the <codeph>XMLDocument.docTypeDecl</codeph> property is set to <codeph>null</codeph>. 
	 The <codeph>XML.toString()</codeph> method outputs the contents of <codeph>XML.docTypeDecl</codeph>
	 immediately after the XML declaration stored in <codeph>XML.xmlDecl</codeph>, and before any other
	 text in the XML object. If <codeph>XMLDocument.docTypeDecl</codeph> is null, no
	 <codeph>DOCTYPE</codeph> declaration is output.</p>
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.xml:XMLDocument:idMap"><apiName>idMap</apiName><shortdesc>
	 An Object containing the nodes of the XML that have an id attribute assigned.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>Create a text file named "idMapTest.xml" containing the following text:
	 
	 <listing>&lt;?xml version="1.0"?&gt; 
	 &lt;doc xml:base="http://example.org/today/" xmlns:xlink="http://www.w3.org/1999/xlink"&gt; 
	   &lt;head&gt; 
	     &lt;title&gt;Virtual Library&lt;/title&gt; 
	   &lt;/head&gt; 
	   &lt;body&gt; 
	     &lt;paragraph id="linkP1"&gt;See &lt;link xlink:type="simple" xlink:href="new.xml"&gt;what's 
	       new&lt;/link&gt;!&lt;/paragraph&gt; 
	     &lt;paragraph&gt;Check out the hot picks of the day!&lt;/paragraph&gt; 
	     &lt;olist xml:base="/hotpicks/"&gt; 
	       &lt;item&gt; 
	         &lt;link id="foo" xlink:type="simple" xlink:href="pick1.xml"&gt;Hot Pick #1&lt;/link&gt; 
	       &lt;/item&gt; 
	       &lt;item&gt; 
	         &lt;link id="bar" xlink:type="simple" xlink:href="pick2.xml"&gt;Hot Pick #2&lt;/link&gt; 
	       &lt;/item&gt; 
	       &lt;item&gt; 
	         &lt;link xlink:type="simple" xlink:href="pick3.xml"&gt;Hot Pick #3&lt;/link&gt; 
	       &lt;/item&gt; 
	     &lt;/olist&gt;
	   &lt;/body&gt; 
	  &lt;/doc&gt;
	 </listing>
	 
	 <p>Then create a SWF file in the same directory as the XML file. Include the following
	 script in the SWF:</p>
	 
	 <listing>
	 var readXML = new XMLDocument();
	 readXML.load("idMapTest.xml");
	 readXML.onLoad = function(success) {
	 	myXML = new XMLDocument();
	 	myXML.parseXML(readXML);	
	 	for (var x in myXML.idMap){
	 		 trace('idMap.' + x + " = " + newline + myXML.idMap[x]);
	 		 trace('____________' + newline);
	 	}
	 }
	 </listing>
	 
	 <p>When you test the SWF file, the following output is generated:</p>
	 
	 <listing>
	 idMap.bar = 
	 &lt;link id="bar" xlink:type="simple" xlink:href="pick2.xml"&gt;Hot Pick #2&lt;/link&gt;
	 ____________
	 
	 idMap.foo = 
	 &lt;link id="foo" xlink:type="simple" xlink:href="pick1.xml"&gt;Hot Pick #1&lt;/link&gt;
	 ____________
	 
	 idMap.linkP1 = 
	 &lt;paragraph id="linkP1"&gt;See &lt;link xlink:type="simple" xlink:href="new.xml"&gt;what&apos;s 
	 
	       new&lt;/link&gt;!&lt;/paragraph&gt;
	 ____________
	 </listing>
	 
	 </maelexample></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiData>unknown</apiData><apiValueClassifier>Object</apiValueClassifier></apiValueDef><apiDesc>
	 An Object containing the nodes of the XML that have an <codeph>id</codeph> attribute assigned. 
	 The names of the properties of the object (each containing a node) match the values of the 
	 <codeph>id</codeph> attributes.
	 
	 <p>Consider the following XMLDocument object:</p>
	 
	 <codeblock>
	 &lt;employee id='41'&gt;
	 	&lt;name&gt;
	 		John Doe
	 	&lt;/name&gt;
	 	&lt;address&gt;
	 		601 Townsend St.
	 	&lt;/address&gt;
	 &lt;/employee&gt;
	 
	 &lt;employee id='42'&gt;
	 	&lt;name&gt;
	 		Jane Q. Public
	 	&lt;/name&gt;
	 &lt;/employee&gt;
	 &lt;department id="IT"&gt;
	 	Information Technology
	 &lt;/department&gt;
	 </codeblock>
	 
	 <p>In this example, the <codeph>idMap</codeph> property for this XMLDocument object is an Object with 
	 three properties: <codeph>41</codeph>, <codeph>42</codeph>, and <codeph>IT</codeph>. Each of these 
	 properties is an XMLNode that has the matching <codeph>id</codeph> value. For example, 
	 the <codeph>IT</codeph> property of the <codeph>idMap</codeph> object is this node:</p> 
	 
	 <codeblock>
	 &lt;department id="IT"&gt;
	 	Information Technology
	 &lt;/department&gt;
	 </codeblock>
	 
	 <p>You must use the <codeph>parseXML()</codeph> method on the XMLDocument object for the 
	 <codeph>idMap</codeph> property to be instantiated.</p>
	 
	 <p>If there is more than one XMLNode with the same <codeph>id</codeph> value, the matching property
	 of the <codeph>idNode</codeph> object is that of the last node parsed. For example:</p>
	 
	 <codeblock>
	 var x1:XML = new XMLDocument("&lt;a id='1'&gt;&lt;b id='2' /&gt;&lt;c id='1' /&gt;&lt;/a&gt;");
	 x2 = new XMLDocument();
	 x2.parseXML(x1);
	 trace(x2.idMap['1']);
	 </codeblock>
	 
	 This will output the <codeph>&lt;c&gt;</codeph> node: 
	 
	 <codeblock>
	 <codeph>&lt;c id='1' /&gt;</codeph>
	 </codeblock>
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.xml:XMLDocument:ignoreWhite"><apiName>ignoreWhite</apiName><shortdesc>
	 When set to true, text nodes that contain only white space are discarded during the parsing process.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example loads an XML file with a text node that contains only white space; the <code>foyer</code> tag comprises fourteen space characters. To run this example, create a text file named <em>flooring.xml</em>, and copy the following tags into it:
	 <listing>
	 &lt;house&gt;
	    &lt;kitchen&gt;   ceramic tile   &lt;/kitchen&gt;
	    &lt;bathroom&gt;linoleum&lt;/bathroom&gt;
	    &lt;foyer&gt;              &lt;/foyer&gt;
	 &lt;/house&gt;
	 </listing>
	 <p>Create a new Flash document named <em>flooring.fla</em> and save it to the same directory as the XML file. Place the following code into the main Timeline:</p>
	 <listing>
	 // create a new XML object
	 var flooring:XML = new XML();
	 
	 // set the ignoreWhite property to true (default value is false)
	 flooring.ignoreWhite = true;
	 
	 // After loading is complete, trace the XML object
	 flooring.onLoad = function(success:Boolean) {
	   trace(flooring);
	 }
	 
	 // load the XML into the flooring object
	 flooring.load("flooring.xml");
	 
	 // output (line breaks added for clarity):
	 &lt;house&gt;
	    &lt;kitchen&gt;   ceramic tile   &lt;/kitchen&gt;
	    &lt;bathroom&gt;linoleum&lt;/bathroom&gt;
	    &lt;foyer /&gt;
	 &lt;/house&gt;
	 
	 </listing>
	 <p>If you then change the setting of <code>flooring.ignoreWhite</code> to <code>false</code>, or simply remove that line of code entirely, the fourteen space characters in the <code>foyer</code> tag will be preserved:</p>
	 <listing>
	 ...
	 // set the ignoreWhite property to false (default value)
	 flooring.ignoreWhite = false;
	 ...
	 // output (line breaks added for clarity):
	 &lt;house&gt;
	    &lt;kitchen&gt;   ceramic tile   &lt;/kitchen&gt;
	    &lt;bathroom&gt;linoleum&lt;/bathroom&gt;
	    &lt;foyer&gt;              &lt;/foyer&gt;
	 &lt;/house&gt;
	 
	 </listing>
	 <span class="flashonly"><p>The XML_blogTracker.fla and XML_languagePicker.fla files in the ActionScript samples folder also contain a code example. The following are typical paths to this folder:</p>
	 <ul>
	   <li>Windows: <i>boot drive</i>\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript </li>
	   <li>Macintosh: <i>Macintosh HD</i>/Applications/Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript </li>
	   <li></li>
	 </ul>
	 </span>
	 </maelexample></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiData>false</apiData><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
	 When set to <codeph>true</codeph>, text nodes that contain only white space are discarded during the parsing process. Text nodes with leading or trailing white space are unaffected. The default setting is <codeph>false</codeph>. 
	 <p>You can set the <codeph>ignoreWhite</codeph> property for individual XMLDocument objects, as the following code shows:</p>
	 <codeblock>
	 my_xml.ignoreWhite = true;
	 </codeblock>
	 
	 </apiDesc></apiValueDetail></apiValue><apiValue id="flash.xml:XMLDocument:xmlDecl"><apiName>xmlDecl</apiName><shortdesc>
	 A string that specifies information about a document's XML declaration.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates a text field called <code>my_txt</code> 
	 that has the same dimensions as the Stage. The text field displays properties of the XML packet that loads into the SWF file. The doc type declaration displays in <code>my_txt</code>. Add the following ActionScript to your FLA or AS file:
	 <listing>
	 <code>var my_fmt:TextFormat = new TextFormat();</code>
	 <code>my_fmt.font = "_typewriter";</code>
	 <code>my_fmt.size = 12;</code>
	 <code>my_fmt.leftMargin = 10;</code>
	 
	 <code>this.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, Stage.width, Stage.height);</code>
	 <code>my_txt.border = true;</code>
	 <code>my_txt.multiline = true;</code>
	 <code>my_txt.wordWrap = true;</code>
	 <code>my_txt.setNewTextFormat(my_fmt);</code>
	 
	 <code>var my_xml:XML = new XML();</code>
	 <code>my_xml.ignoreWhite = true;</code>
	 <code>my_xml.onLoad = function(success:Boolean) {</code>
	 <code>  var endTime:Number = getTimer();</code>
	 <code>  var elapsedTime:Number = endTime-startTime;</code>
	 <code>  if (success) {</code>
	 <code>    my_txt.text = "xmlDecl:"+newline+my_xml.xmlDecl+newline+newline;</code>
	 <code>    my_txt.text += "contentType:"+newline+my_xml.contentType+newline+newline;</code>
	 <code>    my_txt.text += "docTypeDecl:"+newline+my_xml.docTypeDecl+newline+newline;</code>
	 <code>    my_txt.text += "packet:"+newline+my_xml.toString()+newline+newline;</code>
	 <code>  } else {</code>
	 <code>    my_txt.text = "Unable to load remote XML."+newline+newline;</code>
	 <code>  }</code>
	 <code>  my_txt.text += "loaded in: "+elapsedTime+" ms.";</code>
	 <code>};</code>
	 <code>my_xml.load("http://www.helpexamples.com/crossdomain.xml");</code>
	 <code>var startTime:Number = getTimer();</code>
	 </listing>
	 </maelexample></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiData>null</apiData><apiValueClassifier>Object</apiValueClassifier></apiValueDef><apiDesc>
	 A string that specifies information about a document's XML declaration. 
	 After the XML document is parsed into an XMLDocument object, this property is set
	 to the text of the document's XML declaration. This property is set using a string
	 representation of the XML declaration, not an XMLNode object. If no XML declaration
	 is encountered during a parse operation, the property is set to <codeph>null</codeph>. 
	 The <codeph>XMLDocument.toString()</codeph> method outputs the contents of the 
	 <codeph>XML.xmlDecl</codeph> property before any other text in the XML object. 
	 If the <codeph>XML.xmlDecl</codeph> property contains <codeph>null</codeph>, 
	 no XML declaration is output.
	 </apiDesc></apiValueDetail></apiValue></apiClassifier></apiPackage>