public toString() : String
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.
String - String.
The following code uses the toString() method to convert an XMLNode object to a String, and then uses the toUpperCase() method of the String class:
var xString = "<first>Mary</first>"
+ "<last>Ng</last>"
var my_xml:XML = new XML(xString);
var my_node:XMLNode = my_xml.childNodes[1];
trace(my_node.toString().toUpperCase());
// <LAST>NG<
docTypeDecl (XML.docTypeDecl property), xmlDecl (XML.xmlDecl property)