
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
121
// Insert the clone, which contains all child nodes, to rootNode.
rootNode.appendChild(rootClone);
trace(rootNode);
// Output (with line breaks added):
// <rootNode>
// <oldest/>
// <middle/>
// <middle/>
// <youngest/>
// <rootNode>
//<oldest/>
//<middle/>
//<middle/>
//<youngest/>
// </rootNode>
// </rootNode>
XML.contentType
my_xml.contentType
The MIME content type that is sent to the server when you call the XML.send() or XML.sendAndLoad() method.
The default is application/x-www-form-urlencoded, which is the standard MIME content type used for most HTML
forms.
Availability
Flash Media Server 2
Example
The following example creates a new XML document and checks its default content type:
// Create a new XML document.
var doc = new XML();
// Trace the default content type.
trace(doc.contentType);
// output: application/x-www-form-urlencoded
XML.createElement()
my_xml.createElement(name)
Creates a new XML element with the name specified in the name parameter. The new element initially has no parent,
children, or siblings. The method returns a reference to the newly created XML object that represents the element.
This method and the
XML.createTextNode() method are the constructor methods for creating nodes for an XML
object.
Availability
Flash Media Server 2
Parameters
name A string indicating the tag name of the XML element being created.
Returns
An XML node; an XML element.
Commenti su questo manuale