5 Replies - 758 Views - Last Post: 23 August 2012 - 01:06 AM Rate Topic: -----

#1 ToshNeox  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 100
  • Joined: 10-December 11

Opening XML file from website

Posted 21 August 2012 - 02:12 PM

Hi everyone, I'm trying to make a weather app using Google's Weather API to supply the information. The weather information is stored in an XML file, but I can't actually open it yet.

I've tried:
document = New XmlDocument()
document.Load("http://www.google.com/ig/api?weather=London,England,UK")



Which results in 'Data at the root level is invalid. Line 1, position 1.'

I'm not sure what's happening? I tried to use a While True infinite loop to block the rest of the code after trying to dump the value of the file (which is above) and even trying to open the URL in Notepad++ I get 'Unsupported API'.

Is This A Good Question/Topic? 0
  • +

Replies To: Opening XML file from website

#2 AdamSpeight2008  Icon User is online

  • MrCupOfT
  • member icon


Reputation: 1952
  • View blog
  • Posts: 8,684
  • Joined: 29-May 08

Re: Opening XML file from website

Posted 21 August 2012 - 02:56 PM

Have tried looking at the url in a web browser?

Spoiler

Was This Post Helpful? 0
  • +
  • -

#3 ToshNeox  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 100
  • Joined: 10-December 11

Re: Opening XML file from website

Posted 21 August 2012 - 03:32 PM

View PostAdamSpeight2008, on 21 August 2012 - 02:56 PM, said:

Have tried looking at the url in a web browser?

Spoiler


Hey, I'm on my iPad at the moment so I can't do much, but in Chrome on my desktop the XML file is dumped and the content is, 'proper', there's no 'unsupported API' message. I was presuming that because the XML file was displayed, opening it via URL would be fine - obviously not. I'll post a picture of what it looks like when I'm next on my desktop.

Intriguing... :bigsmile:
Was This Post Helpful? 0
  • +
  • -

#4 ToshNeox  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 100
  • Joined: 10-December 11

Re: Opening XML file from website

Posted 22 August 2012 - 08:48 AM

The attached image is what the URL looks like to me in Chrome:

Attached Image

I literally clicked in the link I put in my first post, and this is what I get, so there's definitely some content there.
Was This Post Helpful? 0
  • +
  • -

#5 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 957
  • View blog
  • Posts: 3,680
  • Joined: 02-July 08

Re: Opening XML file from website

Posted 22 August 2012 - 10:36 AM

Answered here!
Was This Post Helpful? 1
  • +
  • -

#6 ToshNeox  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 100
  • Joined: 10-December 11

Re: Opening XML file from website

Posted 23 August 2012 - 01:06 AM

View Post_HAWK_, on 22 August 2012 - 10:36 AM, said:



Thanks very much!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1