rss| Create | tips
RSS is a "lightweight, multi-purpose, extensible metadata description and joint promotion format", can also be understood as a specification. It is itself an XML format used to provide selective, aggregated Web content for content consolidation clients. Today, many sites start by creating RSS feeds to provide content integration services to viewers, providing news, site content updates, and so on. Visitors can easily get these organizations and aggregated information through some client software.
So, how do you create an RSS feed on our own web site? Let me take asp+access as an example to introduce.
Since RSS is an XML-formatted document, then we should be able to filter the data in the background database according to the conditions, and then generate the data stream in XML format through ASP, and finally send it to the client for browsing.
The selection and collection of data is the forte of ASP, and the key is how to generate the data stream in XML format. In fact, the ASP has its own solution, is to write the data on the response object of the ContentType attribute to define. If response. The value of ContentType is "Text/xml", and the data stream in XML format is sent to the viewer.
The method of calling an RSS feed in IE is no different from a normal link, in the form of:
RSS description
One of the type= "Application/rss+xml" plus does not add as if there is no difference.
The following program segment is the source code for the RSS feed for the "Technical News" section of the "100,000 Why" (http://www.why100000.com/) of my web site, the file name is rssfeed_news.asp.
Where the variable sxmlclear is used to declare that the resulting document is an XML-formatted document that is optional to maintain backward compatibility with older versions of XML.
Srsshead defines the basic elements of RSS. RSS feeds typically consist of 4 main elements: <CHANNEL>,,<ITEM> and <TEXTINPUT>. Where the,<channel> element is a required,<item> element must appear at least once. The <TEXTINPUT> and elements are optional and are to be used depending on the circumstances.
element contains a simple description of the Channel (the source of the RSS feed).