XML to HTML

Joined
Mar 2, 2004
Messages
2,390
Location
Northern Colorado
Hey gang,

Coding question for those of you good with this type of thing... I'm assisting in getting a 'current conditions' weather page up and running and am going to be using the various XML products offered by NWS at the URL below...

http://www.weather.gov/data/current_obs/

I am obviously doing Colorado...

Using the XML feeds listed below, I am going to pull the various items from the feeds.

http://www.weather.gov/data/current_obs/KDEN.xml
http://www.weather.gov/data/current_obs/KFTG.xml
http://www.weather.gov/data/current_obs/KBJC.xml

I am going to be coding the various items into a customized HTML page, tabled to look however we decide. What I am asking is how to get select items (listed below) to show up on a page.

<location>, <station_id>, <weather> and others...

I'll be using more than what I've listed, but I am just trying to get my feet into this. How do I go about pulling the information from these pages to put into an HTML page. Keep in mind that I'll be using multiple feeds on one single page.

Thanks a ton folks!!!!! :cool:
 
Hey gang,

Coding question for those of you good with this type of thing... I'm assisting in getting a 'current conditions' weather page up and running and am going to be using the various XML products offered by NWS at the URL below...

http://www.weather.gov/data/current_obs/

I am obviously doing Colorado...

Using the XML feeds listed below, I am going to pull the various items from the feeds.

http://www.weather.gov/data/current_obs/KDEN.xml
http://www.weather.gov/data/current_obs/KFTG.xml
http://www.weather.gov/data/current_obs/KBJC.xml

I am going to be coding the various items into a customized HTML page, tabled to look however we decide. What I am asking is how to get select items (listed below) to show up on a page.

<location>, <station_id>, <weather> and others...

I'll be using more than what I've listed, but I am just trying to get my feet into this. How do I go about pulling the information from these pages to put into an HTML page. Keep in mind that I'll be using multiple feeds on one single page.

Thanks a ton folks!!!!! :cool:

I have an applescript to do this very thing. If any of you own a Mac, let me know and I can send it to you...
 
Hey Tony, not sure if this is what you want or if this will help, but go to my site, http://www.kschaser.com/ and look at the "Current Weather" in the far right table..

I found a PHP script a while back that pulls the data over and posts it, not sure if that's what you want exactly.. it's pretty customizable.. let me know..
 
What tools do you have at your disposal Tony? I was doing something similar this morning actually. while making a Google Map of my 9/30 chase, I found that the GPS Visualizer website changed the format of their maps (adding many more features), and that the output it gave me was no longer compatible with the template map I was using. So I'm writing a quick little app that will read the GPX XML log file and spit out the the right Javascript format that my webpage uses.

If your server has PHP installed on it, you could use its set of XML parsing functions. There are good docs and examples online at: http://us3.php.net/xml

If you have Visual Studio or can get it (I know there are free versions too, I'd recommend Visual C# Express), there is an XML reading/writing library included in the .Net framework. You simply open the XML file and call read functions until you hit the tag you are looking for and it will give you the values as output, which you could then pass to a TextWriter that would spit out the HTML you want. As far as incorporating directly into a webpage you'll probably need to use ASP, or J# if you are going the Visual Studio road, and I can't help you much past that. The Visual Studio IDE and .Net framework is quite a bit more friendly than coding PHP in an HTML editor.
 
Back
Top