Archive for the 'XML / RSS' Category

An ASP.NET Subroutine To Locally Store The National Weather Service Current Observations XML Feeds

As promised in my last article, here’s some ASP.NET 2.0 / VB.NET code to locally store / cache the National Weather Service’s current observations XML feeds.

The first step in this process is to create a directory on your Web server that is writeable. The second is to determine how, and when, you’ll update your feeds. Then, we can write the code.

Read the rest of this entry »

Using National Weather Service XML Feeds With ASP.NET, ADO.NET And XSL

In a previous article, I noted that I would provide ASP.NET code to consume the National Weather Service’s XML current observation feeds. Here it is.

In the case of PHP, I opted to create a class that would provide a simple array of values from the feed, as well as some predefined outputs for the feed (so far, just an HTML table; in a soon-to-be-released update, we’ll include DIV tags).

In the case of ASP.NET, I may yet build a custom control that creates an image with current weather. But ADO.NET — Microsoft’s classes for data manipulation — makes working directly with the XML feed, and using that data to bind to DataGrids and the like, very simple and direct.

That is, provided you can get the XML feed to work with the XMLDataSource control.

Read the rest of this entry »

National Weather Service Current Observations PHP Script Project Has First Release

As previously promised, I’ve finally gotten around to producing a PHP script to help people with limited programming skills use the National Weather Service’s free current observations XML feeds.

The script — actually, a PHP 5 class — is available at http://nws-feeds-php.sourceforge.net/. Any questions, comments, support requests, etc. should be directed there.

Free Weather On Your Website Via The National Weather Service’s RSS Feeds

A lot of Web sites like to offer current weather observations, and there are several providers out there that will either give you a free, pre-sized box for that contains that information — provided you let them splash their logo all over it and link the image back to them, driving traffic away from your site — or charge you a premium for the information.

But the U.S. government provides this information for you, free of charge, via XML and RSS. That’s right: No matter where you are in the United States, with a little bit of programming, you can make your own current observations weather box, free of charge, and customize it to look exactly how you want it to look.

Read the rest of this entry »