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

推荐订阅源

IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
L
LangChain Blog
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
P
Proofpoint News Feed
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
I
InfoQ
月光博客
月光博客
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
D
Docker
B
Blog

博客园 - 杨发达

Tracking User Activity export to csv + excel 打开乱码的问题 iis asp.net window 认证中的问题。 - 杨发达 sqlserver+job+ 超时 - 杨发达 - 博客园 在XML文件中有些字符是被禁止使用的 在ASP.NET应用程序中使用身份模拟(Impersonation) - 杨发达 - 博客园 在ASP.NET应用程序中使用身份模拟+2.0 Snap 链接预览的应用 sql2005 fulltext search : 根据menu的配置项,执行定义的event .net Application Localization的db 实现 如何制作Mht 文件 + dotnet Composite UI Application Block Study (前) 开源的SSO方案--SourceID.NET OLAP 资源 使用CAB 建立Like Dnn 的桌面应用系统框架- window form application framework olap 常用的前台 Control Javascript: 设置textbox 为readonly . install window service
How to generate an RSS feed for your web site using ASP.N...
杨发达 · 2007-02-05 · via 博客园 - 杨发达

RSS stands for "Really Simple Syndication", is a standardized, XML-formatted means for syndication Web site content.

Understand that RSS is intended to provide information about a Web site's latest content. For example, Yahoo! News provides RSS feeds of the latest news headlines, and TigerDirect.com provides RSS feeds of the feature items on the shopping site. Notice that RSS provides a synopsis for the recent articles or news items. It does not provide the complete content for all of the news items or articles.

Let’s look at a demo RSS feed XML file: (Excerpted from the reference URL.)

<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0">

       <channel>

              <title>uberASP.Net NewsWire</title>

              <link>http://www.uberasp.net/newswire.aspx</link>

              <description>The latest headlines and articles from the world of ASP.NET, Microsoft's Web development platform.</description>

              <copyright>(c) 2004, POP World Media, LLC. All rights reserved.</copyright>

              <ttl>5</ttl>

              <item>

                     <title>Using HttpModules to send the right data format to the client</title>

                     <description>The same data might need to be presented in many different formats, including HTML, XML, rich text, or even

                     an Excel file. Through the use of HttpModules, your site will serve the right kind of data every time.</description>

                     <link>http://www.uberasp.net/GetArticle.aspx?id=15</link>

                     <pubDate>Mon, 12 Jan 2004 04:48:34 GMT</pubDate>

              </item>

              <item>

                     <title>Going solo and running your own consulting business: Is it for you?</title>

                     <description>Columnist explores the ups and downs of being your own boss.</description>

                     <link>http://www.uberasp.net/GetArticle.aspx?id=14</link>

                     <pubDate>Mon, 12 Jan 2004 03:48:35 GMT</pubDate>

              </item>

              <item>

                     <title>Use an HttpHandler to stop bandwidth leeching of your images</title>

                     <description>HttpHandlers make it easy to handle certain file types with a simple interface that anyone can write

                     code for.</description>

                     <link>http://www.uberasp.net/GetArticle.aspx?id=13</link>

                     <pubDate>Fri, 09 Jan 2004 06:14:21 GMT</pubDate>

              </item>

       </channel>

</rss>

Brief introduction to RSS 2.0 speficiation:

The root element of an RSS document is <rss>. It has precisely one child element, <channel>. The <channel> element contains information about the syndicated content, as well as information about each content item being syndicated. There are three required channel elements:

l         <title> - provides a title for the channel.

l         <link> - a URL to the channel.

l         <description> - a short description of the channel.

There are additional optional elements, such as <language>, <copyright>, <webMaster>, and others. For a complete list refer to the RSS 2.0 specification.

The next important part of the spec is what you put in each item. The only thing required here is the title or description. We're using both, plus a link back to the article (because we want people to read the entire story, duh), and the pubDate element so the end-user can see how new the headline is.

[The above content is excerpted from the reference URL.]

******

The following two articles show you how to create an RSS syndication feed that adheres to the RSS 2.0 specification step by step.

Reference URL:

1. Building an RSS feed made simple, posted by Jeff

http://www.uberasp.net/getarticle.aspx?id=17

2. Syndicating Your Web Site's Content with RSS and ASP.NET, posted by Scott Mitchell

http://aspnet.4guysfromrolla.com/articles/021804-1.aspx