public static string ToXmlString(this RSSEntity rss)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            sb.AppendLine("<rss version=\"2.0\">");
            sb.AppendLine("<channel>");
            sb.AppendLine(ToXmlItem <RSSEntity>(rss));
            sb.AppendLine("</channel>");
            sb.AppendLine("</rss>");
            return(sb.ToString());
        }
        public static RSSEntity ToDefaultRss(this IList <ArticleEntity> articleList)
        {
            RSSEntity rss = new RSSEntity()
            {
                Title       = "ZBHBLog RSS",
                Copyright   = "Copyright 2016",
                Generator   = "http://u9.yonyou.com:90",
                Link        = "http://u9.yonyou.com:90",
                Description = "RSS",
                WebMaster   = "zhanggang",
                Image       = new RSSImage()
                {
                    Link        = "http://zhangang/image/logo.jpg",
                    Title       = "ZBHBLog RSS",
                    Url         = "http://u9.yonyou.com:90",
                    Description = "RSS"
                }
            };

            if (articleList == null)
            {
                return(rss);
            }
            foreach (ArticleEntity article in articleList)
            {
                rss.Items.Add(new RSSItem()
                {
                    Title       = article.Title,
                    Author      = article.PostUser,
                    Category    = "默认分类",
                    Link        = "http://u9.yonyou.com:90//Blog?blogId=" + article.BlogId,
                    Guid        = "",
                    PubDate     = article.PostTime,
                    Description = article.Content
                });
            }
            return(rss);
        }