RSS2HTMLPro.ASP script tutorial: how to filter RSS and convert RSS into HTML using RSS2HTMLPro.ASP script - ByteScout

RSS2HTMLPro.ASP script tutorial: how to filter RSS and convert RSS into HTML using RSS2HTMLPro.ASP script

  • Home
  • /
  • Articles
  • /
  • RSS2HTMLPro.ASP script tutorial: how to filter RSS and convert RSS into HTML using RSS2HTMLPro.ASP script
Quick Start tutorial: filter RSS content and convert int HTML using RSS2HTMLPro.asp script
 

This page provides a quick guide on using RSS2HTMLPro.asp script (commercial vresion of freeware RSS2HTML.asp script) to display filtered content from RSS/XML feed on a web-page in ASP or ASP.NET environment.

You can use this script standalone or call from existing page to display filtered HTML content from RSS feed.

Benefits of PRO version:

  • better support for RSS and ATOM feeds;
  • multi-keywords filtering support with ability to use filtering phrases like “HTML-php” with exclude “-” and include “+” operators;
  • filtering by title, description, link is supported;
  • customized date and time format (to display for items) support;
  • support for multiple RSS feeds to HTML conversion (via MultiRSS2HTML.asp included into PRO version);
  • tech support, help with customization and free updates within 12 months;

See also: displaying content from multiple RSS feeds using PRO version

HTML template for RSS2HTML conversion

PRO version uses the following HTML template code (you can adjust this code to fit your design or contact us to help you if you are a registered user of PRO version):

‘ ##### Main template constants
‘ ##### {CHANNELTITLE} will be replaced with item Channel Title
‘ ##### {CHANNELURL} will be replaced with item Channel Url
MainTemplateHeader = “<table><tr><td><a href=”& “””{CHANNELURL}””” & “>{CHANNELTITLE}</a></td></tr>”
MainTemplateFooter = “</table>”
‘ #####

‘ ##### Item template.
‘ ##### {LINK} will be replaced with item link
‘ ##### {TITLE} will be replaced with item title
‘ ##### {DESCRIPTION} will be replaced with item description
‘ ##### {DATE} will be replaced with item date and time
‘ ##### {COMMENTSLINK} will be replaced with link to comments (If you use RSS feed from blog)
‘ ##### {CATEGORY} will be replaced with item category
ItemTemplate = “<tr><td><strong>{DATE} {TIME}</strong><br/><strong>{CATEGORY}<br/></strong><a href=” & “””{LINK}””” & “>{TITLE}</a><BR>{DESCRIPTION}</td></tr>”
‘ #### You can set Date and Time macros formatting:
‘#### Date Time format
‘#### dd – Day
‘#### DD – Full Day Name
‘#### mm – Month
‘#### MMMM – Full Month Name
‘#### yyyy – Year
‘#### HH – Hour
‘#### MM – Minute
‘#### SS – Second
‘#### Offset – Time offset from UTC
DateTemplate = “dd.mm.yyyy”
TimeTemplate = “HH:MM:SS Offset”

Using URL to RSS feed and keywords passed as parameters:

You can use hard coded URL to RSS feed or pass link to a feed as a parameter in URL to the script.

To pass RSS feed link as a parameter (so you can pass different RSS feeds to a one script) just set UseParametersFromURL variable inside RSS2HTMLPro.asp script to True.

Then pass URL to RSS feed as a “URLToRSS” parameter in URL like this:

http://mywebsite.com/RSS2HTMLPro.asp?URLToRSS=http://digg.com/rss/indexprogramming.xml

Below is a screenshot of generated HTML content:

rss2htmlpro_produced_html_from_url_rss_in_ie

To set filtering keywords use the following parameters:

  • Keywords – keywords string (use “-” and “+” operators to exclude/include keywords, for example: HTML-word, HTML+php)
  • FilterByTitle – (set True or False) filter items from RSS by their titles
  • FilterByDescription – (set True or False) filter items from RSS by their descriptions
  • FilterByURL – (set True or False) filter items from RSS by their links to full articles

For example: http://mywebsite.com/RSS2HTMLPro.asp?Keywords=HTML

Screenshot of generated HTML content (items from RSS were filtered by “HTML” keyword):

rss2htmlpro_produced_html_from_use_keywords_in_url_in_ie

Example: RSS2HTMLPro.asp?Keywords=HTML-color+php

Screenshot of generated content below (items were filtered by “HTML” and “PHP” include keywords and excluding “color” negative keyword):

rss2htmlpro_produced_html_from_keywords_with_operator_exclude_in_url_in_ie

How to use script on existing web-pages:

To call script from existing page please use virtual include ASP command: < !–#include virtual=”RSS2HTMLPro.asp”–>.
For example you can include HTML generated by RSS2HTMLPro.asp into Demo.asp page like this:

< p>RSS content is displayed below:</p>
< hr>
< !–#include virtual=”RSS2HTMLPro.asp”–>
< hr>

IMPORTANT: If you call script without parameters in URL then make sure that you’ve set UseParametersFromURL variable inside script to False so script will use hardcoded parameters, not external parameters passed in URL

 
prev
next