HTML and CSS Reference
In-Depth Information
<yweather:location city="Conshohocken" country="US" region="PA" xmlns:yweather=" http://xml.weather.
yahoo.com/ns/rss/1.0 "/>
<yweather:units distance="mi" pressure="in" speed="mph" temperature="F" xmlns:yweather=" http://xml.
weather.yahoo.com/ns/rss/1.0 "/>
<yweather:wind chill="70" direction="0" speed="0" xmlns:yweather=" http://xml.weather.yahoo.com/ns/
rss/1.0 " />
<yweather:atmosphere humidity="94" pressure="29.85" rising="2" visibility="4"
xmlns:yweather=" http://xml.weather.yahoo.com/ns/rss/1.0 " />
<yweather:astronomy sunrise="5:57 am" sunset="8:12 pm" xmlns:yweather=" http://xml.weather.yahoo.com/
ns/rss/1.0 "/>
<image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link> http://weather.yahoo.com </link>
<url> http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif < /url>
</image>
<item>
<title>Conditions for Conshohocken, PA at 6:34 pm EDT</title>
<geo:lat xmlns:geo=" http://www.w3.org/2003/01/geo/wgs84_pos# ">40.08</geo:lat>
<geo:long xmlns:geo=" http://www.w3.org/2003/01/geo/wgs84_pos# " >−75.3</geo:long>
<link> http://us.rd.yahoo.com/dailynews/rss/weather/Conshohocken__PA/*http://weather.yahoo.com/
forecast/USPA0326_f.html </link>
<pubDate>Wed, 01 Aug 2012 6:34 pm EDT</pubDate>
<yweather:condition code="30" date="Wed, 01 Aug 2012 6:34 pm EDT" temp="70" text="Partly Cloudy"
xmlns:yweather=" http://xml.weather.yahoo.com/ns/rss/1.0 " />
<description>
<![CDATA[ <img src=" http://l.yimg.com/a/i/us/we/52/30.gif " /><br /> <b>Current Conditions:</b>
<br /> Partly Cloudy, 70 F<BR /> <BR /><b>Forecast:</b><BR /> Wed - Scattered Thunderstorms. High: 82
Low: 66<br /> Thu - Partly Cloudy. High: 91 Low: 70<br /> <br /> <a href=" http://us.rd.yahoo.com/
dailynews/rss/weather/Conshohocken__PA/*http://weather.yahoo.com/forecast/USPA0326_f.html " >Full
Forecast at Yahoo! Weather</a><BR/><BR/> (provided by <a href=" http://www.weather.com " >The Weather
Channel</a>)<br/> ]]>
</description>
<yweather:forecast code="47" date="1 Aug 2012" day="Wed" high="82" low="66" text="Scattered
Thunderstorms" xmlns:yweather=" http://xml.weather.yahoo.com/ns/rss/1.0 " />
<yweather:forecast code="30" date="2 Aug 2012" day="Thu" high="91" low="70" text="Partly Cloudy"
xmlns:yweather=" http://xml.weather.yahoo.com/ns/rss/1.0 " />
<guid isPermaLink="false">
USPA0326_2012_08_02_7_00_EDT
</guid>
</item>
</channel>
</results>
</query>
As you can see from Listing 11-1, the ad makes an HTTP request to the http://query.yahooapis.com domain
with the query parameter of zip=19428 and gets a valid XML in response with detailed weather conditions for the
user-defined ZIP code. This is really powerful! If you take what you've just learned from your ad server, you can have
the ad server detect your location on the initial ad request, convert the location data to a ZIP code, and pass the
weather service that ZIP code to provide a relevant and up-to-date ad experience that the user actually cares about all
at ad serve time.
 
Search WWH ::




Custom Search