Create RSS 2.0 Feeds With Classic ASP
This vbscript class implements all features described by the RSS 2.0 reference.
It also includes a handy routine for creating valid RFC822 date stamps in the format Wed, 02 Feb 2006 15:00:00 GMT.
Version 1.2
Code showing all features available for the feed header:
Set oRSS = New cRSS20
With oRSS
'// CREATE THE RSS HEADER:
.Encoding = "<?xml version="1.0" encoding="ISO-8859-1" ?>"
.Stylesheet = "<?xml-stylesheet title="My XSL Formatting" href="MyStylesheet.xsl" type="text/xsl"?>"
.UseCustomDates = True
.Title = "My RSS News Service"
.Link = "http://www.MyDomain.com/"
.Description = "My excellent news service about something."
.Language = "en-gb"
.Copyright = "Copyright 2006, Oslo My Company Name"
.ManagingEditor = "manager@MyDomain.com (Elvis Presley)"
.WebMaster = "webmaster@MyDomain.com (Priscilla Presley)"
.PubDate = "Sat, 07 Sep 2006 00:00:01 GMT"
.LastBuildDate = "Sat, 07 Sep 2006 09:42:31 GMT"
.Category = "Newspapers"
.Generator = "MightyInHouse Content System v2.3"
.Docs = "http://blogs.law.harvard.edu/tech/rss"
.Cloud = "<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>"
.TimeToLive = "60"
.Image = "My News, http://www.MyDomain/image.gif, http://www.MyDomain/, 120, 60, Text for the title attribute."
.Rating = "http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html"
l gen true for "http://www.MyDomain.com" r (n 0 s 0 v 0 l 0)'"
.TextInput = "Submit, Submit your feedback to our news service, txtFeedback,
http://www.MyDomain.com/feedback.asp"
.SkipHours = "6, 7, 8, 9, 10, 11"
.SkipDays = "Saturday, Sunday"
'// CREATE THE RSS BODY:
Response.Write .CreateRSS20Feed(oRs)
End With
Example of a feed item with all available elements:
