Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RSS or blog type output from an asp site?

Status
Not open for further replies.

mopacfan

Programmer
Oct 30, 2000
190
US
I have a client who is using a content management system I wrote last year. The client has asked for the cms system to output the data in a feed that can be formatted and viewed inside of other web pages, much the way blog data works. I'll admit I don't know a lot about blogs since I find them mostly uninteresting and difficult to navigate.

Anyway...can something like this be accomplished without creating a .dll? I've given it some thought and just can't come up with a solution. It may be that none exists.

Any help, advise or opinions on the matter will be greatly appreciated.
 
The RSS feed is a XML file:



Your app reads this:





hth,
Foxbox
ttmug.gif
 
Foxbox,

Thank you very much, I guess I need to get up to speed on .net. I'm still using 3.0 as I've not had a need to migrate to .net. Now I do :)
 
i admit: i had never looked at RSS before. But "selective perception" stroke: in the latest issue of one of my computer magazines there was an article about RSS readers and suddenly i see this orange XML gif everywhere...

I googled a little bit more, and found this excellent page with the RSS specification:

Creating a RSS feed is very easy: you create a very simple XML file.

Code:
dim fs, rss
Set fs=Server.CreateObject( "Scripting.FileSystemObject" )
set rss = fs.CreateTextFile( "rsstest.xml")

' Write Required channel elements:
rss.write "<?xml version=""1.0"" ?>" & vbCrLf
rss.write "<rss version=""2.0"">" & vbCrLf
rss.write "<channel>" & vbCrLf
rss.write "<title>My RSS Test!</title>" & vbCrLf
rss.write "<link>[URL unfurl="true"]http://www.tek-tips.com</link>"[/URL] & vbCrLf
rss.write "<description>RSS test</description>" & vbCrLf

' Write item elements: (in a real program you'll 
' write the result of a recordset in a loop) 
rss.write "<item>" & vbCrLf
rss.write " <title>Item title</title>" & vbCrLf
rss.write " <description>Item description" &_
          "</description>" & vbCrLf
rss.write " <link>[URL unfurl="true"]http://www.tek-tips.com</link>"[/URL] & vbCrLf
rss.write "</item>" & vbCrLf

' close channel
rss.write "</channel>" & vbCrLf
rss.write "</rss>" & vbCrLf
rss.Close
set rss = nothing

For reading a RSS feed i found FeedDemon (30 USD from Bradbury software) good. But Abilon ( is free and works the same.

I also found an alternative for that ASP.net article:

where you can download channel.asp, a script using MSXML2.ServerXMLHTTP.4.0

There are also Javascripts that you can use within your site. Eg:
and

ttmug.gif
 
Yep, I looked into this recently too. Basically all you have to do is have a page that instead if outputting text/html it outputs text/xml. Just make sure your response.Write's are all bundled in the right blocks of code so that it will always have valid formating and this should atually be easier than creating the original pages (no need to mix pretty colors, find images, etc).

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
It is possible to use HTML formatting in the description, but XML will complain about the tags and ampersands. First i started with a UDF with several replaces, but there is an easier way: HTMLencode()
RSS was a way to 'solve' a little puzzle. I have a program running on a server where i can't use mail functionality. Users may enter error reports, but i must login to see if something is there. Not anymore! The error report is now a RSS feed. . .


ttmug.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top