homepage Welcome to WebmasterWorld Guest from 54.196.120.58
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

    
Please teach me.
Help me creating RSS
clyde66




msg:3019764
 3:50 am on Jul 24, 2006 (gmt 0)

Guys please help creating an RSS regarding nursing.. Can i add a dynamic html page to my site? Not java script..

 

Jim Catanich




msg:3025308
 4:14 am on Jul 28, 2006 (gmt 0)

Would you be interested in a Classic ASP RSS Feed?

Create the following Subroutine

<%
Sub GetRssFeed (strFeedUrl)
response.ContentType="text/html"
dim objXML, objXSL
set objXML=server.CreateObject("MSXML2.DOMDocument")
set objXSL=server.CreateObject("MSXML2.DOMDocument")
objXML.async=False
objXSL.async=False
objXML.setProperty "ServerHTTPRequest",true
objXML.load strFeedUrl
objXSL.load Server.MapPath("rssStyle.xslt")
'response.write "<html><head><title>RSS Feed Reader</title></head><body>"
response.write objXML.transformNode(objXSL)
'response.write "</body></html>"
set objXML=nothing
set objXSL=nothing
end sub
%>

Create the Dynamic ASP page. The following has three RSS feeds. Just look for the Nursing feed and substitute the URL.

<table>
<tr>
<td>
<h2>What's New At Google</h2>
<%GetRssFeed "http://news.com.com/2063-10812_3-0.xml"%><br><br>
<h2>Technology News</h2>
<%GetRssFeed "http://www.nytimes.com/services/xml/rss/nyt/Technology.xml"%><br><br>
<h2>SEO Chat</h2>
<%GetRssFeed "http://feeds.feedburner.com/#*$!/articles/"%><br><br>
</td>
</tr>
</table>

Save the ASP page.

Last create the "rssStyle.xslt" page and save it in the same directory location as the web page.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" />

<xsl:template match="/rss/channel">
<b><xsl:value-of select="title" disable-output-escaping="yes" /></b>
<xsl:for-each select="item">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="title" disable-output-escaping="yes" />
</a>
(<xsl:value-of select="pubDate" />)
</li>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Save this code as "rssStyle.xslt"

Good luck

Jim Catanich

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved