Guest User

Untitled

a guest
Jan 24th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. {
  2. String country = TextBox1.Text;
  3. XmlDocument doc1 = new XmlDocument();
  4. doc1.Load("http://api.openweathermap.org/data/2.5/weather?q=+"+country+"sg&mode=xml&APPID=*changedAPPID*");
  5. XmlElement root = doc1.DocumentElement;
  6. XmlNodeList nodes = root.SelectNodes("/response/current_observation");
  7. foreach (XmlNode node in nodes)
  8. {
  9. string temperaturev = node["temperature.value"].InnerText;
  10. Label1.Text = temperaturev;
  11. }
  12.  
  13. }
Add Comment
Please, Sign In to add comment