Click here to Skip to main content
15,896,348 members
Articles / Web Development / HTML

RSS Feed - Need of the hour !

Rate me:
Please Sign up or sign in to vote.
4.25/5 (13 votes)
7 May 2007CPOL6 min read 52.4K   290   41  
This article is aimed to get familiar with RSS (Really Simple Syndication) Feed, its formation, practical usage and its progmatical implementation
<html>

<HEAD>
<title> Understanding RSS Feed</title>
</HEAD>

<body>

<p><font color="#FF0000" face="Verdana"> Feed Reader - Sample usage 01</font></p>

<div id="any_id" style="position:relative; width:100%; height:50%; overflow:auto;">

<%
	const inputRSSFile ="http://blog.360.yahoo.com/rss-RFHidsM_erFb5Sks9KqfGlOOxPA-?cq=1" 
	
	dim marqueeString
	
	Set xmlhttp = Server.CreateObject("msxml2.serverxmlhttp")
	xmlhttp.Open "GET", inputRSSFile, false 
	xmlhttp.Send 

	 set objXMLDoc = Server.CreateObject("MSXML2.DOMDocument") 
	 objXMLDoc.async = false 
	 objXMLDoc.loadxml(xmlhttp.ResponseText) 


	dim ParentNode,ChildN, temp1, temp2
        dim wer

	for each ParentNode in objXMLDoc.documentElement.childNodes

		for each ChildN in ParentNode.ChildNodes

				if childN.nodeName= "item" then
					
					for each tmpNode in childN.ChildNodes

						if tmpNode.nodeName = "title" then
							marqueeString= marqueeString & tmpNode.text & "&nbsp;"
							response.write "<font size=""2"" face=""Verdana""><b>" & tmpNode.text & "</b></font><br>"
						end if

						if tmpNode.nodeName = "pubDate" then
							marqueeString= marqueeString & "[" & tmpNode.text & "]" &"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"							
							response.write "<font size=""1"" face=""Verdana"">" & tmpNode.text & "</font><br><br>"							
						end if

						if tmpNode.nodeName = "link" then
							marqueeString= marqueeString & "<a target=""_blank"" href=" & tmpNode.text & ">" & "[see details]" & "</a>" & "&nbsp;"
							
							response.write "<font size=""1"" face=""Verdana"">" & "<a target=""_blank"" href=" & tmpNode.text & ">" & "[see details]" & "</a>" & "</font><br>"
						end if
					next

				end if
		next
	next	
%>
</div>

<p><font color="#FF0000" face="Verdana"> Feed Reader - Sample usage 02</font></p>
<p>
	<marquee scrolldelay="120" style="font-family: Verdana; font-size: 9pt">
		<%= marqueeString %>
	</marquee>
</p>

</body>

</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Pakistan Pakistan
Like typical Piscean, Nawaz Ijaz is a dreamer and a very sensitive guy indeed. He loves to take challenges. His aim is to become the master in his field. He is currently working as a Software Engineer at NetSol Technologies (a CMMI Level 5 Organization). He believes on learning Technologies rather learning tools. He feels comfortable while programming under any platform. However he is keener to work on Web Application Development. Previously, he has also made various Plug-ins for Adobe Acrobat Exchange during his stay at KAPS Computing.

Nawaz Ijaz has done BS (hons) in computer sciences and planning to do some specializations in the same field in near future.

Comments and Discussions