|
|
Free RSS2HTML.asp script
How to display RSS/XML news feed in ASP/ASP.NET using RSS2HTML.ASP script You can download the source code of this freeware
rss2html.asp script here: asp_rss2html.zip
Looking for ASP script with
mutiple RSS2HTML and better keywords filtering ?
This free ASP script uses MSXML to load RSS feed from URL and display it. You can use it standalone or call from script on HTML page to generate HTML content from RSS feed and then display on your HTML page. Frequently Asked Questions new <% ' =========== RSS2HTML.ASP for ASP/ASP.NET ========== ' ##### max number of displayed items ##### ' ##### Main template constants ' ###################################### ' ##### Item template. ' ##### Error message that will be displayed if not items etc ' ================================================ Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") If not xmlDOM.LoadXml(RSSXML) Then Set xmlHttp = Nothing ' clear HTTP object Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS RSSItemsCount = RSSItems.Length-1 ' if not <item>..</item> entries, then try to get
<entry>..</entry> End If Set xmlDOM = Nothing ' clear XML
j = -1 For i = 0 To RSSItemsCount ' fix for the issue when a description from a previous item
for each child in RSSItem.childNodes Select case lcase(child.nodeName) RSSCategory = RSSCategory & categoryitem.text ' now check filter j = J+1 if J<MaxNumberOfItems then Response.Write Replace(ItemContent,"{DESCRIPTION}",RSSDescription) Next ' writing Footer ' Response.End ' uncomment this for use in on-the-fly output
2) Save RSS2HTML.asp and place "RSS2HTML.asp" into root folder of your web-server. (This folder is C:\Inetpub\wwwroot\ by default if you use Internet Information Service (IIS) on Windows 2000 and XP)
To include this script into existing page use virtual include ASP command. For example you can include generated HTML it into MyPage.asp like this: < html> You can download the source code of this example here: asp_rss2html.zip If you want to display filtered RSS feeds using customizable keywords please check RSS2HTML Scout library for ASP and ASP.NET If you like our free RSS2HTML script for ASP and you use it we would appreciate if you will place link to this page somewhere on your web-site so another ASP web-masters will be able to find this free script. If you like RSS2HTML.asp script then spread the word by copying and pasting this HTML code below:
Looking for ASP script with mutiple RSS2HTML
and better keywords filtering ? Frequently Asked Questions: new Q: How to display items in backward order? new For i = 0 To RSSItemsCount with For i = RSSItemsCOunt To 0 Step -1 Q: I have RSS feed and it worked fine. But suddenly
script returns errors new Q: How to open links in new browser window? ItemTemplate = "<tr><td><font size=1><a href=" & """{LINK}""" & " target='_blank'>{TITLE}</a></font><BR><font size=-2>{DESCRIPTION}</font></td></tr>" Q: How to change font size for the displayed items? ItemTemplate = "<tr><td><font size=1><a href=" & """{LINK}""" & ">{TITLE}</a></font><BR><font size=-2>{DESCRIPTION}</font></td></tr>" Q: How to filter items using predefined keywords? Please try to modify RSS2HTML.asp script to something like this: MyKeyword
= "Computer" bSkip
= FALSE ' checking
title If Not bSkip Then j =
J+1 End If Next Looking for ASP script with mutiple
RSS2HTML and better keywords filtering ?
Check our commercial ASP/ASP.NET components:
FeedForAll - easy RSS feed creation tool and RSS2HTML for PHP from www.feedforall.com
|
||
|
Copyright © ByteScout, 2003-2009. Privacy Statement
Microsoft®, Windows®, Windows 2000®, Windows Server®, Windows Vista®, Internet Explorer®, .NET Framework®, ActiveX®, Visual Basic®, Visual C#®, ASP®, ASP.NET®, Excel®, PowerPoint®, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe®, Flash® and Acrobat® are registered trademarks of Adobe Systems, Incorporated. Mozilla®, Firefox® and the Mozilla and Firefox Logos are registered trademarks of the Mozilla Foundation. Other product names or brandnames used herein are for identification purposes only and might be trademarks or registered trademarks of their respective companies. We disclaim any and all rights to those marks. |
|||