RSS Manipulation in ASP
What is RSSmanip?
RSSmanip is a set of scripts that allows webmaster who already generate an RSS feed for their site to dynamically create HTML, HDML, and WML documents based on their RSS feed. Using the Microsoft XML parser (supplied with IE 5) on the server side, you can now enable your site for wireless usage by using those scripts.
I haven’t tested these scripts on multiple platforms but here’s the environment I used to create them:
- - NT 4.0 with service pack 6
- - IIS 4.0
- - Internet Explorer 5.5 (this is important because Microsoft replaced the XML engine on which this script relies)
- - A well formatted RSS file
What files are in RSSmanip.zip?
Recently, I’ve started doing some manipulations or RSS file for different presentations. Included in this zip file are three files to do so:
- html.asp Creates an HTML output of your RSS file
- hdml.asp Creates an HDML output of your RSS file (for more on HDML, check out http://www.phone.com)
- wml.asp Creates a WML output of your RSS file (for more on WML, check out http://www.wapforum.org)
Installing those files is relatively easy.
- Download the source code here.
- Open each of them in your favorite text editor and edit the following lines:
mylogo = "./presentation/images/TNLwlogo.bmp" myRSSfile = "/newsletter/channel.xml"
mylogois the location of your logo file. For HDML, that file has to be a .bmp file and for WML, it has to be a .wbmp file. Editors for each are available on the web.
myRSSfileis the location of your RSS file beyond the root.
- Open up the IIS console, go to your server properties, click on
HTTP headers, click on
File Typesand add the following:
.bmp image/bmp .hdml text/x-hdml .wbmp image/vnd.wap.wbmp .wml text/vnd.wap.wml
- Save the settings and reboot your server.
- Put the files on your site and that’s it. You’re up and running.
If you want to redirect WML and HDML browser automatically to the appropriate files, use the following script:
acceptHeader = Request.ServerVariables("HTTP_ACCEPT") If Instr(acceptHeader, "hdml") 0 Then Response.Redirect "/hdml.asp" Elseif Instr(acceptHeader, "wml") 0 Then Response.Redirect "/wml.asp" End Ifwhere
/wml.aspare the locations or those files (in my example, they’re in the root directory of the server.
An earlier version of these scripts allows you to generate code from a RSS 0.91 feed. It is also available for download.
How much does it cost?
RSSmanip is free! If you want to use it, I’d like to receive a link back to TNL.net from you or receive a donation from you.
I’ve created those files for my personal use and am happy to share them with you. However, I do not make any guarantee as to their impact on your server. They seem to work fine on mine when I used them. If you use them, I’d appreciate a link back to TNL.net. Since I moved TNL.net to a Linux platform in late 2002, I am no longer supporting these scripts.