|
Can we some how manipulate the CSV data which is provided by
many sites. And show them in Flex.Below is the sample code. <?xml version="1.0"
encoding="utf-8"?> <mx:Application pageTitle="CSV Example"
initialize="svcProducts.send();"
xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import
mx.controls.Label; public
var str:String= new String(); import
mx.controls.Alert; public
function callfail():void { Alert.show("1"); } public
function callpass():void { // Alert.show("2"); var
name:Label=new Label(); var
namexml:XML=new XML(); str=svcProducts.lastResult.toString(); //namexml.prependChild=svcProducts.lastResult; // Alert.show(str.split('"',10).toString()); Alert.show(str.indexOf(
'"', 0 ).toString()); l1.text=str.split('"',10).toString(); } ]]> </mx:Script> <!-- result="parse(event.result);callpass();" http://quote.yahoo.com/d/quotes.csv?s=gvhr&f=sl1d1t1c1ohgv&e=.csv;"
--> <!--<mx:HTTPService
id="svcProducts" url=""
resultFormat="text" result="parse(event.result)" /> --><mx:HTTPService
id="svcProducts" fault="callfail();"
url=""
result="callpass();"/> <mx:Label
id="l1" x="10"/> <mx:Label
text="{svcProducts.lastResult}" x="20"/> </mx:Application> Thanks Kumar -- 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
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- [flexcoders] Manipulating CSV values KP
- RE: [flexcoders] Manipulating CSV values Tracy Spratt

