MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 148

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 147
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
145
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 documents DOCTYPE decla-
ration (stored in the
XML.docTypeDecl property), followed by the text representation of all XML nodes in the object.
If the
XML.xmlDecl property is undefined, the XML declaration is not output. If the XML.docTypeDecl property
is
undefined, the DOCTYPE declaration is not output.
Availability
Flash Media Server 2
Returns
A string.
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());
XML.xmlDecl
my_xml.xmlDecl
Specifies information about a documents XML declaration. After the XML document is parsed into an XML object,
this property is set to the text of the document’s XML declaration. This property is set by 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
undefined.XML. The XML.toString() method outputs the contents of the XML.xmlDecl
property before any other text in the XML object. If the
XML.xmlDecl property contains the undefined type, no
XML declaration is output.
Availability
Flash Media Server 2
Example
The following example loads an XML file and outputs information about the file:
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success){
if (success){
trace("xmlDecl: " + my_xml.xmlDecl);
trace("contentType: " + my_xml.contentType);
trace("docTypeDecl: " + my_xml.docTypeDecl);
trace("packet: " + my_xml.toString());
}
else {
trace("Unable to load remote XML.");
}
};
my_xml.load("http://foo.com/crossdomain.xml");
See also
XML.docTypeDecl, XML.toString()
Vedere la pagina 147

Commenti su questo manuale

Nessun commento