如何在c#窗口应用程序中显示rss提要

如何在c#窗口应用程序中显示rss提要,c#,.net,C#,.net,我想知道,我们可以在c#donet中制作应用程序,直接以表单形式显示rss提要,还是制作小部件。每次更新都应该通知用户。虽然我只是通过显示rss提要的网页来显示rss提要。如果最新的项目“pubDate”与您收到的最后一个项目不相同,请创建一个计时器,定期检查rss,然后,您收到的最新项目的日期/时间较晚的所有项目都需要通知。如果最新项目“pubDate”与您收到的最后一个项目不同,请创建一个计时器,定期检查RSS,然后,您收到的最新项目的日期/时间较晚的所有项目都需要通知。这是我的博客代码 您

我想知道,我们可以在c#donet中制作应用程序,直接以表单形式显示rss提要,还是制作小部件。每次更新都应该通知用户。虽然我只是通过显示rss提要的网页来显示rss提要。

如果最新的项目“pubDate”与您收到的最后一个项目不相同,请创建一个计时器,定期检查rss,然后,您收到的最新项目的日期/时间较晚的所有项目都需要通知。

如果最新项目“pubDate”与您收到的最后一个项目不同,请创建一个计时器,定期检查RSS,然后,您收到的最新项目的日期/时间较晚的所有项目都需要通知。

这是我的博客代码 您可以访问


}这是我的博客代码 您可以访问


}

但是我如何检查包含rss提要的页面内容呢。如何存储内容rss提要的内容是XML格式的,如果您不确定,我建议您检查一下,但是我如何检查包含rss提要的页面的内容。如何存储内容rss提要的内容是XML格式的,如果您不确定,我建议您查看一下
  public XmlDocument GetRss(int count)
    {
        XmlDocument xml=new XmlDocument();
        XmlElement root,chn,elm;
        xml.AppendChild(xml.CreateXmlDeclaration("1.0", "utf-8", "yes"));
        root = xml.CreateElement("rss");
        root.SetAttribute("version", "2.0");
        xml.AppendChild(root);

        chn = xml.CreateElement("channel");
        root.AppendChild(chn);

        elm = xml.CreateElement("title");
        elm.InnerText = System.Web.Configuration.WebConfigurationManager.AppSettings["sitename"];
        chn.AppendChild(elm);

        elm = xml.CreateElement("link");
        elm.InnerText = System.Web.Configuration.WebConfigurationManager.AppSettings["host"];
        chn.AppendChild(elm);

        elm = xml.CreateElement("description");
        elm.InnerText = System.Web.Configuration.WebConfigurationManager.AppSettings["sitedes"] ;
        chn.AppendChild(elm);


        List<Blog> blogs = BlogManager.Instance.GetBlogLists(count);
        foreach (Blog bg in blogs)
        {
            Blog blog=BlogManager.Instance.ReadBlog(bg.keyword,bg.path);
            if (blog.encryption.Trim() == string.Empty)
            {
                XmlElement item = xml.CreateElement("item");
                chn.AppendChild(item);
                elm = xml.CreateElement("title");
                item.AppendChild(elm);
                elm.InnerText = blog.title;

                elm = xml.CreateElement("pubDate");
                item.AppendChild(elm);
                elm.InnerText = blog.pubdate.ToString("r");

                elm = xml.CreateElement("link");
                item.AppendChild(elm);
                elm.InnerText = System.Web.Configuration.WebConfigurationManager.AppSettings["host"] + "Blog/"+bg.path+"/" + blog.keyword + ".esp";

                elm = xml.CreateElement("description");
                item.AppendChild(elm);
                elm.AppendChild(xml.CreateCDataSection(blog.description));

                elm = xml.CreateElement("guid");
                item.AppendChild(elm);
                elm.InnerText = System.Web.Configuration.WebConfigurationManager.AppSettings["host"] + "Blog/" + bg.path + "/" + blog.keyword + ".esp";
                elm.SetAttribute("isPermaLink", "false");
            }

        }
        return xml;

    }
public void ProcessRequest (HttpContext context) {
    if (context.Request.RawUrl.ToLower().Trim().IndexOf(".ashx") != -1) context.Response.Redirect(context.Request.RawUrl.Replace(".ashx", ".esp"));
    context.Response.AddHeader("Cache-Control", "no-cache");
    context.Response.ContentType = "text/xml; charset=utf-8";
    Edwin.Web.BlogManager.Instance.GetRss(20).Save(context.Response.OutputStream);

}

public bool IsReusable {
    get {
        return false;
    }
}