Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Polling XML weather data to file [Thread Next] Re: Polling XML weather data to fileTo: NULL Date: 1/3/2009 2:05:00 PM Terje Moseid Bryhni wrote: > Hi! > This is probably an extreme newbie query, but anyway: > I am trying to utilize weather forecast data from the Norwegian free weather > service http://www.yr.no in a home automation project to be developed in > LabVIEW. This weather service provides (amongst other) xml data from URL's > like: > http://www.yr.no/place/Norway/Telemark/Sauherad/Gvarv/forecast.xml > So far, I haven't been able to make LabVIEW connect automatically to process > the data, but I think I can have it read a file on my disk. In which case I > will need another application to regularly (say, every four hours) connect, > possibly extract and reformat xml data and save it to disk. > > Any hints? Well whether it is XML or some other format does not matter if all you want to do is download the file from the HTTP server. As for downloading a file from a HTTP server, with the .NET framework you could use WebClient and its DownloadFile method: http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfile.aspx To do it every four hours you could implement a Windows service I think. If you also want to process the file and extract data then you have a lot of options in the .NET framework, there is System.Xml.XmlDocument which provides a W3C DOM implementation plus XPath 1.0 support, there is System.Xml.Xsl.XslCompiledTransform which provides XSLT 1.0 support. In .NET 3.5 you could also use LINQ to XML (System.Xml.Linq.XDocument/XElement). -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
