Would you consider dropping the mx:Model step completely and just keep everything xml?
I don't use WebServices much, but if it is returning an xml string then probably the result object is already an xml object. If it is really a string then use: var myXML:XML = mx.utils.XMLUtil.createXML(stringXML) Tracy -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gnaveenrajkumaar Sent: Monday, October 10, 2005 8:24 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Converting string to xml in a model Hello there, ive created a WebService in asp.net that contains a webmethod to read an xml file return as a string in Flex ive added the webservice. i wanted to convert the output string from the webservice to a xml when i used <mx:WebService wsdl="http://localhost/WebService1/Service1.asmx?WSDL" id="webservice1"> <mx:operation name="getDocument"> <mx:request></mx:request> </mx:operation> </mx:WebService> <mx:Model id="myData"> {webservice1.getDocument.result} </mx:Model> <mx:XML id="myXml"> {Convert2XML()} </mx:XML> <mx:Script> <![CDATA[ function initialize_page(){ webservice1.getDocument.send(); my_xml=webservice1.getDocument.result; } function Convert2XML():XML{ var out_xml=new XML(); var out_xml.parseXml(webservice1.getDocument.result); return (out_xml) } ]]> </mx:Script> in flash the similar code returns me an XML object but in flex i'm not able to convert the string to the xml object please someone help me on this bye -- 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 --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/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/