Interface cls_CBRSS

Interface cls_CBRSS

Interface cls_CBRSS_Item

Example

Source of rss.asp <% Option Explicit %><!--#include file="cls_CBRSS.asp" --><%
  dim oRSS, oItem
  set oRSS = new cls_CBRSS
  oRSS.Name = "CB Test Feed"
  oRSS.Link = "http://www.crazybeavers.se/"
  oRSS.Description = "Testfeed for CBRSS Class"
  oRSS.GMT = "+0100"
  oRSS.IncludeStyleSheet = true

  '*** Create new item and add it to the feed
  set oItem = oRSS.NewItem
  oItem.Title = "Title1"
  oItem.Link = "http://Link1/"
  oItem.Comments = "http://Comments1/"
  oItem.Description = "Description1"
  oItem.PubDate = Now()
  oItem.GUID = "http://Link1/"
  oRSS.AddItem(oItem)

  '*** Create new item and add it to the feed
  set oItem = oRSS.NewItem
  oItem.Title = "Title2"
  oItem.Link = "http://Link2/"
  oItem.Comments = "http://Comments2.com/"
  oItem.Description = "Description2"
  oItem.PubDate = Now()
  oItem.GUID = "http://Link1/"
  oRSS.AddItem(oItem)

  oRSS.RenderRSS
  set oRSS = nothing
  Response.End
%>

A quote straight forward script. declare the variables and create a new instance of the class. Then set the standard properties on the object.
  Create a new item and fill it with data. Lastly we add it to the RSS feed. Then we add another just to see that it works.
  Finally we call the RenderRSS function to output the XML document. Then we destroy the RSS object and ends the script with Response.End.