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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 146
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
144
my_xml.onLoad = function(success) {
if (success) {
if (my_xml.status == 0) {
trace("XML was loaded and parsed successfully");
} else {
trace("XML was loaded successfully, but was unable to be parsed.");
}
var errorMessage;
switch (my_xml.status) {
case 0 :
errorMessage = "No error; parse was completed successfully.";
break;
case -2 :
errorMessage = "A CDATA section was not properly terminated.";
break;
case -3 :
errorMessage = "The XML declaration was not properly terminated.";
break;
case -4 :
errorMessage = "The DOCTYPE declaration was not properly terminated.";
break;
case -5 :
errorMessage = "A comment was not properly terminated.";
break;
case -6 :
errorMessage = "An XML element was malformed.";
break;
case -7 :
errorMessage = "Out of memory.";
break;
case -8 :
errorMessage = "An attribute value was not properly terminated.";
break;
case -9 :
errorMessage = "A start tag was not matched with an end tag.";
break;
case -10 :
errorMessage = "An end tag was encountered without a matching
start tag.";
break;
default :
errorMessage = "An unknown error has occurred.";
break;
}
trace("status: "+my_xml.status+" ("+errorMessage+")");
} else {
trace("Unable to load/parse XML. (status: "+my_xml.status+")");
}
};
my_xml.load("http://www.flash-mx.com/mm/badxml.xml");
XML.toString()
my_xml.toString()
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.
Vedere la pagina 146

Commenti su questo manuale

Nessun commento