SelectSingleNode Return Value



I'm working on a school project where I'm using XML data from an online data source to create a small pre-flight briefing tool. The code is intended to be able to search the XML document and get various piece of data (airport code, wind direction/speed, visibility, etc...) and display the data. With a decent bit of scouring the internet, I found a rather simple code that should work.



Dim doc As XmlDocument = New XmlDocument()
doc.Load("http://ift.tt/1KQwQKg")
Dim airportcode As String = doc.SelectSingleNode("//station_id").Value
Label1.Text = airportcode


As you can guess, the label's text doesn't change. I've done research on this and it has something to do with XML Namespaces, but it's just a bit too far over my head for me to understand.


Thanks in advance for the help. -Michael


No comments:

Post a Comment