Page 1 of 1

RSS2HTML weather.com.au feed extract

Posted: Fri May 04, 2012 7:30 am
by tonyworks
Hi guys,

I'm trying to get a working weather feed for my website: http://203.98.84.170/~ncpdev/index.php?page=rates

So far RSS2HTML with the default template can print out chunks of weather data, but I need specific bits like current temperature, max/min temp for styling - as you can see on the weather box (right).

It seems in the code:

Code: Select all

{foreach from=$rss->items item='item'}
{$item.summary}
{/foreach}
displays:

Code: Select all

<item>
...
<description>
<![CDATA[
<b>Temperature:</b> 13.9&deg;C<br /> <b>Dew Point:</b> 6.3&deg;C<br /> <b>Relative Humidity:</b> 60%<br /> <b>Wind Speed:</b> 11.1km/h<br /> <b>Wind Gusts:</b> 16.7km/h<br /> <b>Wind Direction:</b> WSW<br /> <b>Pressure:</b> 1021.2hPa<br /> <b>Rain Since 9AM:</b> 0.0mm<br />
]]>
</description>
but I need this bit:

Code: Select all

<w:current temperature="13.9" dewPoint="6.3" humidity="60" windSpeed="11.1" windGusts="16.7" windDirection="WSW" pressure="1021.2" rain="0.0"/>
And this:

Code: Select all

<w:forecast day="Friday" description="Mostly Sunny. Cool." min="6" max="16" icon="2" iconUri="http://www.weather.com.au/images/icons/2.gif" iconAlt="Mostly Sunny"/>
<w:forecast day="Saturday" description="Mostly Sunny. Mild." min="6" max="17" icon="2" iconUri="http://www.weather.com.au/images/icons/2.gif" iconAlt="Mostly Sunny"/>
<w:forecast day="Sunday" description="Afternoon Clouds. Cool." min="5" max="17" icon="4" iconUri="http://www.weather.com.au/images/icons/4.gif" iconAlt="Afternoon Clouds"/>
Any help, or working alternatives will be great - thanks!

Re: RSS2HTML weather.com.au feed extract

Posted: Fri May 04, 2012 7:33 am
by tonyworks

Re: RSS2HTML weather.com.au feed extract

Posted: Wed Jun 27, 2012 6:01 pm
by geepers
Were you able to sort out how to access the values you wanted from the RSS feed?

I'm looking to accomplish the same thing with a different feed with RSS2HTML as well, but have attempted the solutions I've seen posted so far to no avail.

If you did resolve it, could you kindly share the solution?

Thanks!

/Greg