Hi Faisal,

Initially, I would modify your HTTPService to say:
<mx:HTTPService
    id = "stock"
    url= ""http://finance.yahoo.com/rss/headline?s=%7Bticker.text%7D">http://finance.yahoo.com/rss/headline?s={ticker.text}
"
    useProxy = "false"
    resultFormat="e4x"/>

The addition of this e4x result format will ensure that you can deal with it nicely in ActionScript as XML Objects.

Secondly, Your HTTPService columns are referencing dataField="col1", col2 and col3. Your dataProvider points to the element stock.result => this is the returned XML. stock.result.rss.channel.item is an OK reference as well, and looking at the Yahoo! RSS feed, all you will need to do is alter the dataFields in the DataGrid.

The RSS Feed has a couple of elements you might want to use:

<mx:DataGrid
    dataProvider = "{stock.result.rss.channel.item}"
    id = "dg"
    showHeaders = "true"

    <mx:columns>
        <mx:DataGridColumn
            headerText="Title"
            dataField="title"/>
        <mx:DataGridColumn
            headerText="Title"
            dataField="pubDate"/>
    </mx:columns>

</mx:DataGrid>


This datagrid and columns will get the TITLE and PUBLISHED DATE from the RSS feed and display them in the datagrid. You could then (if you are trying to create an RSS Reader of sorts) create a text area that is bound to the selected item from the datagrid, and read the description element, or source the associated link and display that content.

Best of luck with it, and I hope this was useful.

Regards,
Graham Weldon




Faisal Abid wrote:
Okay Here you are,
The webservice calls an RSS feed FYI and obviouslt i have a text input
and a send button, which i know is right

<mx:HTTPService
url=""http://finance.yahoo.com/rss/headline?s=%7Bticker.text%7D">http://finance.yahoo.com/rss/headline?s={ticker.text}" id="stock"
useProxy="false">
  
</mx:HTTPService>
                <mx:DataGrid width="708" height="311"
dataProvider="{stock.result.rss.channel.item}" verticalCenter="-29"
horizontalCenter="0" id="dg" showHeaders="true" fontWeight="bold"
fontSize="11">
                    <mx:columns>
                        <mx:DataGridColumn headerText="Column 1"
dataField="col1"/>
                        <mx:DataGridColumn headerText="Column 2"
dataField="col2"/>
                        <mx:DataGridColumn headerText="Column 3"
dataField="col3"/>
                    </mx:columns>
                </mx:DataGrid>


Graham Weldon wrote:
> Hi Faisal,
>
> Can you paste in the datagrid you're trying to use, and also a sample XML?
> I feel like you might perhaps be incorrectly referencing the data in
> the XML.
>
> Regards,
> Graham Weldon
>
>
>
> Faisal Abid wrote:
>> Okay, Thanks to alot of people i got that webservice working however,
>> Now I have a diffrent problem , im calling an rss feed , but when it is
>> retured it doesnt populate the datagrid , i mean you can see something
>> is populating but it is invisible , there is a scroll bar and everything
>> but it is invisible.
>
>
>
> --
> 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
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>
>       Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>
>       Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>
>       Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "flexcoders
>       <http://groups.yahoo.com/group/flexcoders>" on the web.
>       
>     *  To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>       
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <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




Reply via email to