Retrieve specific span html data from a RSS FEED

By nightkarnation | Jul 5, 2009

actionscript3

Hello!
I have created a widget for flash that retrieves the xml rss feed and displays whatever information is in…the title, description, image, etc…

Im having a problem to retrieve some very specific information from this XML feed…

Please take a look at how the xml is configured:

HTML Code:


]]></description>
</item>
<item xmlns:cfi="http://www.microsoft.com/schemas/rss/core/2005/internal" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005">
  <title cf:type="text"><![CDATA[NIKKIX - Asian Lady]]></title>
  <link>http://…</link>
  <pubDate>2009-07-05T16:00:00Z</pubDate>
  <category>WebCams</category>
  <atom:published>2009-07-05T16:00:00Z</atom:published>
  <atom:updated>2009-07-05T16:00:00Z</atom:updated>
  <guid isPermaLink="true">http://…</guid>
  <cfi:id>52680963</cfi:id>
  <cfi:read>true</cfi:read>
  <cfi:downloadurl>http://…</cfi:downloadurl>
  <description cf:type="html"><![CDATA[

<A HREF="http://…profile_U_R.jpg?369674533" width="320" height="240" border="0" hspace="5"></A>

<br>

<span style="font:19px arial;"><b>Live VideoChat Description:</b></span><br>

100% BLAH BLAH DESCRIPTIONbr><br>

<span style="font:19px arial;"><b>About Me:</b></span><br>

I’m very outspoken, outgoing, silly,  sarcastic, adventurous, what u see is what u get and a friend forever.<br><br>

<span style="font:19px arial;"><b>My stats:</b></span><br>

<b>Eye Color</b>: brown<br>

<b>Hair Color</b>: brunette<br>

<b>Measurements</b>: 36D-27-36<br>

<b>Ethnicity</b>: Multiracial<br>

<b>Height</b>: Tall<br>

<b>Age</b>: 32<br>

<A HREF="…">Visit Me</A>

]]></description>
</item>


Im trying to retrieve without success for example the Live VideoChat Description or about me information or the stats…

Here is the working part of the AS 3 code to retrieve the image:

Code:

trace(theXMLData.channel.item[b]);
var myPattern:RegExp = /src="(.*?)" //with this i retrieve the html link of the picture but how can i retrieve the about me text info for example ???
var str:String = (theXMLData.channel.item[b].description);
var result:Object = myPattern.exec(str)[1];
imageList.push( result);


with this code i retrieve the html link of the picture but how can i retrieve the about me text info for example ???

Any ideas?? help please!

actionscript3

Please reply at our Forum

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

© 2007 ActionScript 3.0