rss| Create | dynamic | Web page 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.
in IE browser to invoke the RSS feed method and the common link is no different, the format is:
of which the type= "Application/rss+xml" plus does not add as if there is no difference.
The following program segment is the source code of the RSS feed for creating a website column, the file name is rssfeed_news.asp.
where the variable sxmlclear is used to declare the resulting document as an XML-formatted document, the declaration 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>,<image>,<item> and <textinput>. Where the,<channel> element is a required,<item> element must appear at least once. The <textinput> and <image> elements are optional and are to be used depending on the circumstances.
The <channel> element contains a simple description of the channel (the source of the RSS feed). <title> is the name/title;<link> of the channel is a simple description of the content of <channel>, which corresponds to the content of the Web page containing the contents of the url;<description>; <language> representative language. There are other attributes that are not too often used.
The
<item> element is used to describe the records in the database. <item> typically has several items that correspond to a collection of data for an RSS feed.
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.