Click here to Skip to main content
13,598,210 members
Click here to Skip to main content
Add your own
alternative version


20 bookmarked
Posted 31 Aug 2007
Licenced CPOL

Yahoo! Weather Viewer

, 31 Aug 2007
Rate this:
Please Sign up or sign in to vote.
An article on retrieving the weather data using Yahoo! Weather RSS feed


This article is about a small non-MFC Win32 application that uses Yahoo! Weather RSS feeds to parse and show the weather information to the user. These RSS 2.0 feeds are represented by a small XML file with a very simple inner structure which makes it easy to the 3rd party applications to parse and show weather information all around the world and at any time. You can find more info about developing the custom application which uses these feeds on the following web site: Yahoo! developer's corner.

Using the Code (Application)

To use the application just open the compiled Yahoo Weather Viewer.exe file in the Debug or in the Release folder of the project directory. One will also find the Countries folder which holds data about different countries (for easier access). I have built these data files using Yahoo! Weather web site for most European countries. They are plain text files so one will have no difficulties to understand them.

The application sends a simple HTTP GET request to the Yahoo! Weather service. It has the following form:

The parameter p here stands for location ID or a ZIP code (US only). The second parameter u stands for units (Celsius or Fahrenheit degrees, miles or kilometers, etc). The returned file has a simple RSS 2.0 structure shown below:

  • XML
  • RSS
      • title
      • link
      • description
      • info...
      • IMAGE
        • title
        • width
        • height
        • link
        • URL
      • ITEM
        • title
        • link
        • description
        • info...

So, this web service response needs to be parsed and weather information has to be extracted. This feed covers information considering the following:

  • Location info (city, region and country)
  • Units info (temperature, distance, pressure and speed)
  • Wind info (chill, direction and speed)
  • Atmosphere info (humidity, visibility and pressure)
  • Astronomy info (sunrise and sunset)
  • Conditions info (description, temperature and date)
  • Forecast info (day, lowest temperature, highest temperature, description and date)

On the other hand, to obtain the satellite or any other kind of map with weather conditions, one will have to look for it on the special image locations (Yahoo! Weather service periodically updates these images). See links below for examples:

After downloading, these JPEG files can be converted and shown to the user.

Points of Interest

I had a very good time building this application and I hope people will find it useful.


  • August, 2007 - Yahoo! Weather Viewer v1.0


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) Elektromehanika d.o.o. Nis
Serbia Serbia
He has a master degree in Computer Science at Faculty of Electronics in Nis (Serbia), and works as a C++/C# application developer for Windows platforms since 2001. He likes traveling, reading and meeting new people and cultures.

You may also be interested in...

Comments and Discussions

GeneralKorea Pin
john wallis1-Sep-07 20:17
memberjohn wallis1-Sep-07 20:17 
GeneralRe: Korea Pin
darkoman1-Sep-07 23:54
memberdarkoman1-Sep-07 23:54 
NewsAlso see... Pin
Ravi Bhavnani31-Aug-07 8:07
memberRavi Bhavnani31-Aug-07 8:07 
GeneralRe: Also see... Pin
darkoman31-Aug-07 12:23
memberdarkoman31-Aug-07 12:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web02 | 2.8.180621.3 | Last Updated 31 Aug 2007
Article Copyright 2007 by darkoman
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid