Add RSS functionality to your site

Source: Internet
Author: User
Tags add net rar version domain name
RSS Browsing Pole RSS Subscriptions page, you can see Tenkine to facilitate the user to customize the site content of each RSS channel set up. By subscribing to different RSS feeds (which can subscribe to multiple sites at the same time), viewers can get timely news information without logging on to the site, and avoid unwanted ads and spam messages on the web. The use of RSS will save a lot of time for visitors, will also become the embodiment of the site user-friendly design of a bright spot, upgrading the site's grade.

In fact, RSS technology is not too difficult, if your site information is large, you can use this technology to their own site.

Small Knowledge: what is RSS

rss is a simple way of sharing content between sites and sites (also known as "aggregated content") and is typically used for news and other sequential sites, such as blog sites. The Web site provides RSS output to help users find updates to the site's content. Web site users can use a similar news reader and other RSS-enabled news aggregation tool software, without opening the site content page to read the support of RSS output Web site content. The use of news reader can refer to the 2004 "Computer" 36th G5 version of "News fast food, do in RSS."

One, the enemy, win

To create RSS for the website, first we must have an in-depth understanding of RSS. RSS is a form of XML (extensible Logo language), and all RSS files are subject to the XML 1.0 specification published on the World Wide Web Consortium site. In general, the top level of the RSS document is a < RSS > element as the root element,< RSS > element has a mandatory attribute version, which specifies the current RSS document versions, currently used RSS version is 2.0. < RSS > Element sub element is the only < channel > element that contains information and content about the site or column, with three required statements:

< Title: The name of the site or column, generally with the site or the page title of the column consistent;
< link: The URL of the website or column;
< Description: A brief description of the site or column.

can also use some such as < language > (language), < copyright > (copyright notice) and other optional statements to enrich the < channel > content, the specific news feed will rely on to reflect. General One news is a < item >,< item > There should be at least one < title > or < Description, and other statements can be selected as needed.

Tip: More RSS statements can refer to the http://www.donews.net/softbunny/articles/11030.aspx. When learning RSS statements, you can use IE to open an XML link for reference, such as the Tenkine Network Communications Forum aggregation content Http://rss.chinabyte.com/218424581927469056.xml.

 II, RSS, hand-made

After understanding the structure and usage of RSS specific statements, we can manually edit the RSS feeds in the most commonly used Notepad or web editing software in the following format.

<?xml version= "1.0" encoding= "gb2312"? ><!return_edit ><rss version= "2.0" ><!return_edit><channel><!return_edit><title> name of website or column </title><!return_edit><link> website or column URL address </link><!return_edit><description > website or column brief introduction </description><!return_edit><item><!return_edit><title> news title </title><!return_edit><link> News link Address </link><!return_edit><description> News Brief Introduction </description><!return_edit><pubDate> press release Time </pubdate><!return_edit> <author> News Author Name </author><!return_edit></item><!return_edit><item><! Return_edit>......<!return_edit></item><!return_edit></channel><!return_edit ></rss>

The Chinese text and ellipsis part is to add the news section, follow the prompts in turn to save as an. xml file and add the "XML" icon in the appropriate location of the site, and then link to the. xml file, so that your site has RSS output.

Three, the tool writes, relaxed freely

If the Web site updates the volume of news, rely on hand-written RSS files may be wrong. We can ask the RSS generator (download address: Http://sq.onlinedown.net/down/rsscreator.rar) to assist us in our work. Open the software and execute "file → new →rss" to create a new RSS file (Figure 1). First in the above "required elements" section of the "Description", "Link" and "Title" three of the contents of the required statements, to add a news item to click on the "Items" button to enter the News add window (Figure 2), click the "Add" button to add a news item, Then in the statement on the left, according to the prompts to add news headlines (title), Brief (Description) and links (link), etc., and then return to the main interface of the software, press the Save button in the toolbar to save the document as an. xml file.

Figure 1

Figure 2

Tip: RSS generators require the support of the. NET Framework to download and install the. NET Framework component packages at http://go.microsoft.com/fwlink/?LinkId=9832 before installation.

Four, automatic generation, once and for all

For static web site we can hand or use tools to write RSS output, if the dynamic site to be through the program to convert news database content output RSS. Interested friends can download the conversion template at Http://www.mh.fy.cn/rss2.rar, this template is suitable for asp+access Dynamic Web site update system, and need to modify the database link part of the Db=*.mdb. In addition, in the database field to read and to the news headlines (title) and links (link) and other fields to make some changes according to the specific situation of the database (Figure 3), the use of the template debugging success, the site's RSS output address is http://your domain name/rss2.asp.

Figure 3



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.