actionscript 3 - AS3: URLLoader: XML: missing data (data == "<") -


i'm creating website. data loaded xml on web.

when accessing swf app, fine.

the owner of site aint computer i'm creating tool him manage website.

i'm trying load same xml tool loader's data "<".

xml header:

<?xml version="1.0" encoding="utf-8" ?> 

this works:

     public function main():void     {         var xml_url:string = "the_web_url_of_the_xml";         _xmlloader = new urlloader(new urlrequest(xml_url));         _xmlloader.addeventlistener(event.complete, onxmlloaded);     }      private function onxmlloaded(e:event):void      {         _xml = new xml(_xmlloader.data);     } 

this not work: (httpstatus = 200. no error thrown. _xmlloader.data = "<";)

    private function importdata(url:string):void     {         var xml_url:string = "the_web_url_of_the_xml";         _xmlloader = new urlloader();         _xmlloader.addeventlistener(event.complete, ondataloaded);         _xmlloader.addeventlistener(ioerrorevent.io_error, onerror);         _xmlloader.addeventlistener(securityerrorevent.security_error, onsecurity);         _xmlloader.addeventlistener( httpstatusevent.http_status, handlehttpstatus );         _xmlloader.load(new urlrequest(xml_url));     }       private function ondataloaded(e:event):void      {         var xml:xml = new xml(_xmlloader.data);     } 

in ondataloaded function, change: var xml:xml = new xml(_xmlloader.data);

to: var xml:xml = new xml(e.currenttarget.data);


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -