Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Polling XML weather data to file

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent