Has anyone wrote anything for weather.gov?

dayv2005

Member
I was wondering if anyone has already wrote something like this? And were willing to share? I am in the process of writing our own weather plug-in. And i just didn't want to spend a bunch of time on it if someone else already had something out there. Thanks.
 

dayv2005

Member
I actually found out that the weather channel has a SDK which is pretty good.

I have it set up and retrieving the xml from the passed in zip. The issue i am having now is parsing out the xml into a temp table. Is there any easy way of doing this? Or can someone point me in the right direction for doing this?
 

sdjensen

Member
Progress supports parsing XML.

Here is some code that should you get started.

Code:
def var hXMLroot as handle no-undo.
create x-document hXMLroot.
hXMLroot:load('FILE', ifilename, false) no-error.
repeat i = 1 TO hXMLroot:num-children:
 
....
 
end.
 

tamhas

ProgressTalk.com Sponsor
If you are real lucky and have a recent enough version of Progress, check out the READ-XML method for temp-tables and ProDataSets. Unfortunately, it doesn't work for a lot of externally sourced XML so you may have to parse it yourself. If so, read up on the SAX-READER which is faster and more easily controlled than the DOM approach.
 

dayv2005

Member
thanks sdj. I'm using that method now. Now i was able to populate info via xml request to the weather channel to a couple temp tables in my code. This seems to work good. And i do have 10.1c but currently we are still running everything in 9.1d. Have yet to upgrade.
 

tamhas

ProgressTalk.com Sponsor
And i do have 10.1c but currently we are still running everything in 9.1d. Have yet to upgrade.

Ouch.
 
Top