惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

博客园 - miao~

C# 截取1位小数 ASP.NET 获取MSN联系人列表 扩展老赵的 直接通过User Control生成HTML 分页功能 小技巧在Repeater控件中找到对应模板内的控件 大型互联网网站架构心得之一:分 UML 序列图 sql存储过程教程 Create an ASP.NET AJAX Style Folder Explorer BS程序代码与安全与基本攻击/防御模式 RSS2.0规范 利用 .NET 3.5 的 Syndication 相关类读取 RSS Feeds 使用linq to xml 快速创建自己的Rss 代码设计简单规范 VS.PHP 在Visual Studio 下的 PHP 开发 IDE 工具 窥探jQuery——面向JavaScript程序员 开发一个适合Ajax+JSON+jQuery环境使用的多功能页码栏——jPagerBar-1.1.1 最实用的12条css技巧 不错的下拉列表.HTML控件和服务器控件都可以使用 两个粒度看Asp.net生命周期
利用 .NET 3.5 的 Syndication 相关类生成 RSS
miao~ · 2008-05-26 · via 博客园 - miao~

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.ServiceModel.Syndication;
using System.ServiceModel.Web;
using System.Xml;
using System.Collections.Generic;

public partial class CreateRss : System.Web.UI.Page
{
    
protected void Page_Load(object sender, EventArgs e)
    
{
            SyndicationFeed feed 
= new SyndicationFeed("Test Feed""This is a test feed"new Uri("http://Contoso/testfeed"), "TestFeedID", DateTime.Now);
            SyndicationItem item 
= new SyndicationItem("Test Item""This is the content for Test Item"new Uri("http://Contoso/ItemOne"), "TestItemID", DateTime.Now);

            List
<SyndicationItem> items = new List<SyndicationItem>();
            items.Add(item);
            feed.Items 
= items;

            XmlWriter rssWriter 
= XmlWriter.Create(Server.MapPath("RSS.XML"));
            Rss20FeedFormatter rssFormatter 
= new Rss20FeedFormatter(feed);
            rssFormatter.WriteTo(rssWriter);
            rssWriter.Close();
    }

}