Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get weather information
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01340690
Message ID:
01340694
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform