MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 453

Actionscript language reference
Table of Contents

Advertisement

// </rootNode>
// create a copy of rootNode using cloneNode() to demonstrate a deep copy
var rootClone:XMLNode = rootNode.cloneNode(true);
// insert the clone, which contains all child nodes,
rootNode.appendChild(rootClone);
trace(rootNode);
// output (with line breaks added):
// <rootNode>
//
<oldest />
//
<middle />
//
<middle />
//
<youngest />
//
<rootNode>
//
<oldest />
//
<middle />
//
<middle />
//
<youngest />
//
</rootNode>
// </rootNode>
XML.contentType
Availability
Flash Player 6.
Usage
my_xml.contentType:String
Description
Property; the MIME content type that is sent to the server when you call the
XML.sendAndLoad()
the standard MIME content type used for most HTML forms.
Example
The following example creates a new XML document and checks its default content type:
// create a new XML document
var doc:XML = new XML();
// trace the default content type
trace(doc.contentType);
The following example defines an XML packet, and sets the content type for the XML object.
The data is then sent to a server and shows a result in a browser window.
var my_xml:XML = new XML("<highscore><name>Ernie</name><score>13045</score>
</highscore>");
my_xml.contentType = "text/xml";
my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank");
See also
XML.send(),
XML.sendAndLoad()
method. The default is
// output: application/x-www-form-urlencoded
application/x-www-form-urlencoded
to rootNode
XML.send()
, which is
XML.contentType
or
453

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