In your getDocument operation, define a handler for the service result: <mx:operation name="getDocument" result="onResult(event)">
var _xmlDP:XML; Define a handler function: Private function onResult(oEvent:Object):Void { trace(oEvent.result); //make sure you have what you think you have //if result is truly a string _xmlDP = mx.utils.XMLUtil.createXML(oEvent.result) } Now you can do whatever you want with the xml document member variable. Tracy -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gnaveenrajkumaar Sent: Tuesday, October 11, 2005 4:09 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Help on how to create a object out of an XML hello there, i have created a webservice in asp.net that retrives data from a xml file and the output of the function is a xml document file... i wanted to create an object out of this xml document i retrive and i am not able to do so. any body please advice on how to proceed below is my code =========================================== <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" initialize="initializes()"> <mx:WebService wsdl="http://localhost/WebService1/Service1.asmx?WSDL" id="webservice1"> <mx:operation name="getDocument"> <mx:request format="object"></mx:request> </mx:operation> </mx:WebService> <mx:XML id="xml1"> {webservice1.getDocument.result} </mx:XML> <mx:Model id="model1"> {xml1} </mx:Model> <mx:Script> <![CDATA[ function initializes(){ webservice1.getDocument.send(); } ]]> </mx:Script> <mx:TextInput width="400" height="100" text="{model1.APN.DateTime}"/> </mx:Application> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/