Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get weather information
Message
 
To
21/08/2008 04:09:14
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01340690
Message ID:
01340694
Views:
15
>HI everyone
>
>I want to display the current "Air Temperature" on system.
>
>Someone told me use RSS
>
>Is't the easy way to get that infromation from observatory ?
>
>if yes, how to program with "http://rss.weather.gov.hk/rss/CurrentWeather.xml",
>how to make it into a .txt file.
>
>Is't another way can do it ?

You can use XMLTOCURSOR() on this XML file. Here is one way of doing it (Assuming you downloaded the XML file to your c:\)
XMLTOCURSOR("c:\currentweather.xml","weather",512)
SELECT weather
LOCATE 
nCount =ALINES(myWeather,weather.iTem)
FOR i = 1 TO nCount
  IF "AIR TEMPERATURE" $ myWeather[i]
     ? STRTRAN(myWeather[i],"<br/>","")
     EXIT 
  ENDIF
ENDFOR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform