• 谷歌天气API-C# 代码

    天气API 谷歌天气API 谷歌天气API-C# 代码: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using System.Xml; using System.Net; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { /* * XML µØÖ· * http://www.google.com/ig/api?weather=FuZhou&hl=zh-cn * * ²ÎÊý˵Ã÷ * weather £º³ÇÊÐÃû³Æ * hl £ºÓïÑÔ - ĬÈÏÓ¢ÎÄ */ int i = 0; XmlNodeList GWP_NodeList = GoogleWeatherAPI_Parser(@"http://www.google.com/ig/api?weather=FuZhou&hl=zh-cn").SelectNodes("xml_api_reply/weather/current_conditions"); Label l = new Label(); l.Text = "ÌìÆø×´¿ö£º " + GWP_NodeList.Item(i).SelectSingleNode("condition").Attributes["data"].InnerText; l.Text += "<br/>"; l.Text += "ζȣº " + GWP_NodeList.Item(i).SelectSingleNode("temp_c").Attributes["data"].InnerText; l.Text += "<br/>"; l.Text += "ʪ¶È£º " + GWP_NodeList.Item(i).SelectSingleNode("humidity").Attributes["data"].InnerText; l.Text += "<br/>"; l.Text += "<img src='http://www.google.com/" + GWP_NodeList.Item(i).SelectSingleNode("icon").Attributes["data"].InnerText + "' />"; this.form1.Controls.Add(l); } /// <summary> /// ¹È¸èÌìÆø /// </summary> /// <param name="baseUrl"></param> /// <returns></returns> private XmlDocument GoogleWeatherAPI_Parser(string baseUrl) { HttpWebRequest GWP_Request; HttpWebResponse GWP_Response = null; XmlDocument GWP_XMLdoc = null; try { GWP_Request = (HttpWebRequest)WebRequest.Create(string.Format(baseUrl)); GWP_Request.UserAgent = @"Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4"; GWP_Response = (HttpWebResponse)GWP_Request.GetResponse(); GWP_XMLdoc = new XmlDocument(); GWP_XMLdoc.Load(GWP_Response.GetResponseStream()); } catch (Exception ex) { Label l = new Label(); l.Text = ex.Message; } GWP_Response.Close(); return GWP_XMLdoc; } }

    5
    95
    1KB
    2010-06-12
    10
  • jQuery 1.3 速查表

    jQuery 1.3 速查表,蛮详细的。

    0
    32
    107KB
    2010-06-12
    5
  • Ext+api+中文版

    中文版EXT JS 的 API 文档、和例子!

    5
    33
    2.26MB
    2010-06-12
    5
  • IIS整合tomcat6图文教程

    IIS整合tomcat6图文教程,和网络上看到的文章基本一样,不过我看他们做的都没配置成功,可我自己乱搞一下就配置成功了,所以就弄了个图文教程放到这里给大家共享。

    0
    63
    423KB
    2010-04-07
    10
  • C# 代码生成器(简单)

    代码生成器 C#代码生成器 C#代码生成

    0
    103
    674KB
    2009-12-06
    10
  • AppTest简单的三层

    C sharp 的简单三层架构应用,专门写给新手学习用的。

    0
    46
    1.16MB
    2009-09-17
    0
  • JSP的面试作业~~

    JSP面试作业 面试作业JSP面试作业 面试作业

    0
    31
    1.07MB
    2009-07-26
    2
  • 数据挖掘:概念与技术

    数据挖掘:概念与技术 数据挖掘 概念与技术 数据挖掘概念与技术

    5
    0
    1.99MB
    2009-07-26
    5
  • xalan-j_2_7_1-bin

    xalan-j_2_7_1-bin xalan xalan-j xalan-j2.7.1

    0
    69
    16.53MB
    2009-07-26
    5
  • SQLDMO.dll 用来获取局域网内所有开启的SQL服务器列表

    SQLDMO.dll 用来获取局域网内所有开启的SQL服务器列表

    4
    80
    832KB
    2009-04-17
    9
关注 私信
上传资源赚积分or赚钱