The title of the title Creating a website Summary Selection Self-zhangking Blog Keyword Creating RSS Source RSS is a "lightweight, multi-purpose, scalable metadata description and joint promotion format", or it is also understood as a specification. It itself is an XML format for providing selective, summarized web content for content integration clients. Today, many sites are started to provide information integration services to the viewer by creating RSS feeds, providing news, site content update, and so on. The viewer can easily obtain these organizations, summarize the information through some client software. So how do you create RSS feeds on our own website? Here I introduce asP Access as an example. Since RSS is a document in XML format, then we should be able to filter data in the background database, organize, organize, and then generate data streams in XML format via ASP, and finally send it to the client to browse. The selection of data, the collection is the ASP's easy drama, the key is how to generate data streams in XML format. In fact, ASP also has its own solution, which is defined on the ContentType property of the response object before writing data. If the value of Response.ContentType is "Text / XML", the data stream in XML format is sent to the viewer. There is no difference between the method and the normal link to call the RSS source in the IE browser. The format is: r 说明 说明 where Type = " Application / RSS XML "does not add as if there is no difference. The following block is the source code for the "Technical News" column on my website "100,000" (www.why100000.com), the file name is RSSFeed_News.asp. Among them, the variable Sxmlclear is used to declare the document generated by a XML format, which is optional to keep backward compatibility with the old version XML. SRSSHEAD defines the basic element of the RSS. RSS feeds are usually composed of 4 main elements:
<% OPTION Explicit%> <% DIM SSQL, RS, SCRLF, SXMLCLEAR, SRSSHEAD, SRSSEND SCRLF = CHR (13) & chr (10) 'Enter Covers SXmlclear = " XML Version =' 1.0 'Encoding =' GB2312 '?>" & SCRLF SRSSHEAD = "
Scrlf response.write "" & "http://www.why100000.com/_news/show_a_new.asp?autoid=" & rs ("f_i_autoid") & " limited" "& SCRLF Response.write"
http://blog.9cbs.net/zhangking/
related articles
Improve the design and implementation of the website in the search engine (including presentation and original code) displaying an image created in the WebForm's Dadagrid's RSS content summary to create .NET Create .NET Create a database component