Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- String country = TextBox1.Text;
- XmlDocument doc1 = new XmlDocument();
- doc1.Load("http://api.openweathermap.org/data/2.5/weather?q=+"+country+"sg&mode=xml&APPID=*changedAPPID*");
- XmlElement root = doc1.DocumentElement;
- XmlNodeList nodes = root.SelectNodes("/response/current_observation");
- foreach (XmlNode node in nodes)
- {
- string temperaturev = node["temperature.value"].InnerText;
- Label1.Text = temperaturev;
- }
- }
Add Comment
Please, Sign In to add comment