...

View Full Version : Resolved javascript or jquery select text without proper html tags



weaksauce
10-10-2012, 06:36 PM
I'm trying to use a poorly designed rss feed from weather bug for a website. I'm trying to retrieve the information to put in an already styled widget.

The RSS i have parsed is:


<div>
<img src="http://deskwx.weatherbug.com/images/Forecast/icons/cond999.gif" border="0" alt="" width="50" height="42"/>&nbsp;&nbsp;&nbsp;
<b>Unknown</b> <br />
<b>Temperature:</b> 50.4 &deg;F<br />
<b>Humidity:</b> 81 %&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Dew Point:</b> 45? &deg;F <br />
<b>Wind Speed:</b> 5 mph W &nbsp;&nbsp; <b>Gusts:</b> 18 mph WSW<br />
<b>Pressure:</b> 29.95 &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>Rain Today:</b> 0.00 &quot;<br />
</div>


I basically need to select and extract:
temperature, rain chance, pressure, wind speed, gusts, dew point, and humidity...

I've tried doing selecting all the <b> tags but I don't know how to get the nex text node after the closing b tag.

Any help will greatly be appreciated.

xelawho
10-10-2012, 07:02 PM
can you provide the link to the rss feed? It may be easier dealing directly with the output

weaksauce
10-10-2012, 07:27 PM
http://feeds.weatherbug.com/rss.aspx?zipcode=15401&feed=curr&zcode=z4641

weaksauce
10-10-2012, 08:52 PM
I was able to find an API and use JSON to retrieve the data instead.

http://developer.weatherbug.com/docs/read/WeatherBug_API_JSON



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum