# Help with RSS XML Feed and ActionScript 3

**URL:** <https://forum.kirupa.com/t/help-with-rss-xml-feed-and-actionscript-3/253529>\
**Category:** flash\
**Created:** [March 2, 2008, 5:40pm UTC](https://forum.kirupa.com/t/help-with-rss-xml-feed-and-actionscript-3/253529 "2008-03-02T17:40:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![koltz](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@koltz](https://forum.kirupa.com/u/koltz)\
**Post date:** [March 2, 2008, 5:40pm UTC](https://forum.kirupa.com/t/help-with-rss-xml-feed-and-actionscript-3/253529/1 "2008-03-02T17:40:06Z")

</div>

I am working on a Flash based RSS reader and trying to extract just the \<img src="…"\> code out of the \<description\> tag, but I haven’t found a solution. I tried doing a trace, but that comes up with a undefined for data.

Here is my code so far and RSS XML example:

```auto
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);

lb.addEventListener(Event.CHANGE, itemChange);

function itemChange(e:Event):void
{
    tb.htmlText = lb.selectedItem.data;
    ta.htmlText = "<a href=\"" + lb.selectedItem.link + "\">" + lb.selectedItem.label + "</a>";
}

var xml:XML;

function onLoaded(e:Event):void
{
    
    xml = new XML(e.target.data);
    var il:XMLList = xml.channel.item;  
    for(var i:uint=0; i<il.length(); i++)
    {
        lb.addItem({data:il.description.text()*, link:il.link.text()*,
                        label:il.title.text()*});
    }
}

loader.load(new URLRequest("http://www.siteurl.com/rss.xml"));

```

```auto

    <channel>
        <title>Site Name</title>
        <description></description>
        <link>http://www.siteurl.com</link>
        <lastBuildDate>Sat, 01 Mar 2008 22:02:43 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <image>
            <url>/images/logo.png</url>
            <title>Site Name</title>
            <link>http://www.siteurl.com</link>
            <description><![CDATA[Site Name]]></description>
        </image>
        <item>
            <title>Title of First Feed Item</title>
            <link>http://www.siteurl.com/link.html</link>
            <description><![CDATA[<img src="http://www.siteurl.com/images/stories/users/logo.jpg" align="left" border="0" alt="" /> This is a sample article with a preceeding picture.</description>

         </item>
     <channel>

```

So under the \<item\>\<description\>, it has a preceeding image, I just want to pull the Image URL and drop everything else.

Thanks,

Corey
