I\'ve been using this code to try and get data from the google weather API, but I never get even close to pulling out what i want.
My goal is to look at:
Maybe you should use node.SelectSingleNode("city").Attributes["data"].Value
instead of node.InnerText
--EDIT-- This works for me
XmlDocument doc = new XmlDocument();
doc.Load("http://www.google.com/ig/api?weather=london+uk");
var list = doc.GetElementsByTagName("forecast_information");
foreach (XmlNode node in list)
{
Console.WriteLine("City : " + node.SelectSingleNode("city").Attributes["data"].Value);
}
list = doc.GetElementsByTagName("current_conditions");
foreach (XmlNode node in list)
{
foreach (XmlNode childnode in node.ChildNodes)
{
Console.Write(childnode.Attributes["data"].Value + " ");
}
}