RSS (Part of the file)

OK, this one probably would be simple if you know what you're doing, but I don't --at all.
Just to give you a bit of background, I'm building a database and I have an embedded web browser (which is where my question comes in). One of the forms is to store location - city/state. I got to thinking it would be cool to add the current weather conditions at the location. One way I thought to go about it is adding a link to yahoo weather. Then I stumbled across the RSS feeds. I can read it, so I have an idea of what's going on, but RSS/XML/Web-Stuff-in-general is not really my thing.

My Question is how do I turn this (the RSS feed for Augusta Georgia):

http://xml.weather.yahoo.com/forecastrss?p=USGA0032&u=f

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
- <channel>
  <title>Yahoo! Weather - Augusta, GA</title>
  <link>http://us.rd.yahoo.com/dailynews/rss/weather/Augusta__GA/*http://xml.weather.yahoo.com/forecast/USGA0032_f.html</link>
  <description>Yahoo! Weather for Augusta, GA</description>
  <language>en-us</language>
  <lastBuildDate>Fri, 08 Sep 2006 7:53 am EDT</lastBuildDate>
  <ttl>60</ttl>
  <yweather:location city="Augusta" region="GA" country="US" />
  <yweather:units temperature="F" distance="mi" pressure="in" speed="mph" />
  <yweather:wind chill="69" direction="40" speed="3" />
  <yweather:atmosphere humidity="84" visibility="805" pressure="30.08" rising="1" />
  <yweather:astronomy sunrise="7:06 am" sunset="7:44 pm" />
- <image>
  <title>Yahoo! Weather</title>
  <width>142</width>
  <height>18</height>
  <link>http://weather.yahoo.com/</link>
  <url>http://us.i1.yimg.com/us.yimg.com/i/us/nws/th/main_142b.gif</url>
  </image>
- <item>
  <title>Conditions for Augusta, GA at 7:53 am EDT</title>
  <geo:lat>33.47</geo:lat>
  <geo:long>-81.97</geo:long>
  <link>http://us.rd.yahoo.com/dailynews/rss/weather/Augusta__GA/*http://xml.weather.yahoo.com/forecast/USGA0032_f.html</link>
  <pubDate>Fri, 08 Sep 2006 7:53 am EDT</pubDate>
  <yweather:condition text="Cloudy" code="26" temp="69" date="Fri, 08 Sep 2006 7:53 am EDT" />
- <description>
- <![CDATA[
<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52/26.gif" /><br />
 <b>Current Conditions:</b><br />
 Cloudy, 69 F<BR /><BR />
 <b>Forecast:</b><BR />
  Fri - PM Showers. High: 83 Low: 67<br />
  Sat - Partly Cloudy. High: 88 Low: 67<br />
 <br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Augusta__GA/*http://xml.weather.yahoo.com/forecast/USGA0032_f.html">Full Forecast at Yahoo! Weather</a><BR/>
 (provided by The Weather Channel)<br/>
 

  ]]>
  </description>
  <yweather:forecast day="Fri" date="08 Sep 2006" low="67" high="83" text="PM Showers" code="39" />
  <yweather:forecast day="Sat" date="09 Sep 2006" low="67" high="88" text="Partly Cloudy" code="30" />
  <guid isPermaLink="false">USGA0032_2006_09_08_7_53_EDT</guid>
  </item>
  </channel>
  </rss>

 Into....

Current Temperature, Current Weather condition ("Like Partly CLoudy").

That's all I'm really interested in.
jdcollins21Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
After a quick google of rss parser javascript, I found something I could quickly hack

<html>
<head>
<script>
function getCurrent() {
  var str = "<B>Current Conditions:</B><BR>" // Cloudy, 73 F<BR><BR>
  var parts = document.getElementById('weather').innerHTML.split(str);
  if (parts.length == 0) return; // not found
  var weatherStr = parts[1].substring(0,parts[1].indexOf('<BR><BR>'))
  document.getElementById('x').innerHTML=weatherStr  
}
</script>
</head>
<body onLoad="getCurrent()">
<div style="display:none" id="weather">
<script src="http://rssxpress.ukoln.ac.uk/lite/viewer/?rss=http%3A%2F%2Fxml.weather.yahoo.com%2Fforecastrss%3Fp%3DUSGA0032%26u%3Df"></script>
</div>
Current weather: <span id="x"></span>

Michel PlungjanIT ExpertCommented:
PS: The reason for going through a server side javascript parser is the javascript security model does not allow an ajax call or similar to a site other than the one the script is served from...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jdcollins21Author Commented:
Awesome. This is exactly what I was after. Thanks mplungjan
Michel PlungjanIT ExpertCommented:
Please be aware it will only work as long as
a) the site http://rssxpress.ukoln.ac.uk/lite/viewer/ 
continues to handle the url and their CSS that processes the rss does not change
b) yahoo.com's weather reply does not change

If it does, let me know.

Michel
jdcollins21Author Commented:
Will do. I was already thinking about that and looking at alternatives. But you put me on the right path.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.