216
Server-Side ActionScript Language Reference
XML.toString()
Availability
Flash Media Server 2.
Usage
my_xml
.toString()
Parameters
None.
Returns
A string.
Description
Method; evaluates the specified XML object, constructs a textual representation of the XML
structure, including the node, children, and attributes, and returns the result as a string.
For top-level XML objects (those created with the constructor), the
XML.toString()
method
outputs the document’s XML declaration (stored in the
XML.xmlDecl
property), followed by
the document’s
DOCTYPE
declaration (stored in the
XML.docTypeDecl
property), followed by
the text representation of all XML nodes in the object. The XML declaration is not output if
the
XML.xmlDecl
property is
undefined
. The
DOCTYPE
declaration is not output if the
XML.docTypeDecl
property is
undefined
.
Example
The following example of the
XML.toString()
method sends
<h1>test</h1>
to the log file:
var node = new XML("<h1>test</h1>");
trace(node.toString());
See also
XML.docTypeDecl
,
XML.xmlDecl
NO
T
E
In Flash Media Server, the output of
trace()
statements appears in the application log
file and Application inspector.