-1

I would like to retrieve this data inside of a class in c# based on a URL address "http://sporing.bring.no/sporing.xml?q=TESTPACKAGE-AT-PICKUPPOINT".

Unfortunately, you cannot use "XDocument xml = XDocument.Load("");" to retrieve the data because the url address is not a xml file.

What sourcecode in C# do I need in order to retrieve the data of the xml based on the URL address "http://sporing.bring.no/sporing.xml?q=TESTPACKAGE-AT-PICKUPPOINT"?

Thanks!

HelloWorld1
  • 12,940
  • 25
  • 73
  • 128

1 Answers1

0
XDocument xml = XDocument.Parse(new WebClient().DownloadString("http://sporing.bring.no/sporing.xml?q=TESTPACKAGE-AT-PICKUPPOINT"));

This will probably solve your problem.

Arefi Clayton
  • 771
  • 2
  • 9
  • 19