Some clues:
While you imported the Fault event, you never used it. You will get
either a fault or result, check for both:
service.addEventListener("fault", httpFault);
Also, you arent sending anything with "service.send();". Put the
contents in the paren, ex: "service.send(xmlObject);".
Last, get rid of the listeners when they have done heir job:
this.removeEventListener("result", httpResult);
this.removeEventListener("fault", httpResult);
***
--- In [email protected], "y.mauron" <[EMAIL PROTECTED]> wrote:
>
>
> Dear all,
>
> Here is a fragment of xml. When I try to parse it like that :
>
>
> import mx.rpc.http.HTTPService;
> import mx.rpc.events.FaultEvent;
> import mx.rpc.events.ResultEvent;
>
> public function addMzXMLSpectrum(path:String):void{
> var service:HTTPService = new HTTPService();
> service.url = path;
> service.resultFormat="e4x";
> service.addEventListener(ResultEvent.RESULT,
resultHandler);
> service.send();
> }
>
> public function resultHandler(event:ResultEvent):void{
> var xml:XML = event.result as XML;
> Alert.show(xml.msRun[0].scan[]);
> }
>
> but I never obtain any result :-( Does someone has an idea why ?