phptest-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phptest-users] How to parse xhtml / rss combination output....


From: Valentijn Langendorff
Subject: [Phptest-users] How to parse xhtml / rss combination output....
Date: Wed, 20 Apr 2005 19:42:07 +0200
User-agent: Microsoft-Entourage/10.1.6.040913.0

Hello,

I'm trying to filter output data from rssweather.com [see xml data beneath].
But the problem is not the basic xml data but the inline html table data.
How can I filter the content from the table id elements from within
php/javascript ?

Regards Valentijn
Ps. Beneath the xhtml code , I want to filter out humidity=xx % etc



<?xml version="1.0" encoding="ISO-8859-1"  ?><rss
version="2.0"><channel><title>Amsterdam Airport Schiphol, Netherlands
Weather</title><link>http://www.rssweather.com/icao/EHAM/wx.php</link><descr
iption><![CDATA[Current weather, forecasts and alerts delivered using
RSS.<p>The weather information for this RSS feed is taken from the National
Weather Service (http://weather.noaa.gov/), and powered by HamWeather
(http://www.hamweather.com/).  The RSS feed is provided so that you don't
have to look out of the window to find out the weather, do not use it for
making decisions that involve yours or anybody elses life.</p><p><b>Using
the Feeds</b><ul><li>Request Frequency - The feeds are updated once per
hour.  More frequent requests may result in your access being
limited.</li><li>Web Site Usage - If you are using the feed on your web
site, you are required to maintain a link to rssWeather.com and
hamweather.com</li></ul></b></p>]]></description><ttl>60</ttl><generator>Ham
Weather 3.084 
(http://www.hamweather.com/)</generator><language>en</language><item><title>
Amsterdam Airport Schiphol, Netherlands Weather :: 8C Mostly
cloudy</title><link>http://www.rssweather.com/icao/EHAM/wx.php</link><catego
ry>Current Conditions</category><pubDate>Wed, 20 Apr 2005 11:55:00
+0100</pubDate><description>8C Mostly cloudy</description><body
xmlns="http://www.w3.org/1999/xhtml";><h4><a
href="http://www.rssweather.com/icao/EHAM/wx.php";><img
src="http://www.rssweather.com/images/fcicons/mcloudy.gif"; alt="mostly
cloudy" class="icon" width="55" height="58" id="mcloudy.gif"
border="0"/></a><span class="sky">Mostly cloudy</span> <span
class="temp">8&#176;C</span></h4><dl style="display: inline;">
<dt style="display: inline; font-weight: bold;">Humidity:</dt><dd
id="humidity" style="display: inline;">81%</dd>
<dt style="display: inline; font-weight: bold;">Wind Speed:</dt><dd
id="windspeed" style="display: inline;">9 MPH</dd>
<dt style="display: inline; font-weight: bold;">Wind Direction:</dt><dd
id="winddir" style="display: inline;">ENE (070&#176;)</dd>
<dt style="display: inline; font-weight: bold;">Barometer:</dt><dd
id="pressure" style="display: inline;"> 1012 mb</dd>
<dt style="display: inline; font-weight: bold;">Dewpoint:</dt><dd
id="dewpoint" style="display: inline;">5&#176;C</dd>
<dt style="display: inline; font-weight: bold;">Heat Index:</dt><dd
id="heatindex" style="display: inline;">8&#176;C</dd>
<dt style="display: inline; font-weight: bold;">Wind Chill:</dt><dd
id="windchill" style="display: inline;">5&#176;C</dd>
<dt style="display: inline; font-weight: bold;">Visibility:</dt><dd
id="visibility" style="display: inline;">36952 ft</dd></dl></body><guid
isPermaLink="false">C-11:55 GMT+1 WED APR 20
2005</guid></item></channel></rss>

ICT Solutions & Design

Valentijn Langendorff
E : address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]