[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 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/
RE: [flexcoders] Help on how to create a object out of an XML
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/
Re: [flexcoders] Help on how to create a object out of an XML
I've done this before... Try this... http://www.mail-archive.com/flexcoders@yahoogroups.com/msg09146.html On 10/11/05, gnaveenrajkumaar [EMAIL PROTECTED] wrote: 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 iam 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/mxmlxmlns=* initialize=initializes()mx:WebServicewsdl=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:XMLmx:Model id=model1 {xml1} /mx:Modelmx:Script ![CDATA[function initializes(){webservice1.getDocument.send();}]]/mx:Scriptmx:TextInput width=400 height=100text={model1.APN.DateTime}/ /mx:Application 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 ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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/ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.