Sub getRSS(NoOfResult,RssURL)
Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.4.0")
xmlHttp.Open "Get", RssURL, false
xmlHttp.Send()
myXML = xmlHttp.ResponseText
Set xmlResponse = Server.CreateObject("MSXML2.DomDocument.4.0")
xmlResponse.async = false
xmlResponse.LoadXml(myXML)
Set xmlHttp = Nothing
Set objLst = xmlResponse.getElementsByTagName("item")
Set xmlResponse = Nothing
intNoOfHeadlines = objLst.length -1
For i = 0 To (intNoOfHeadlines)
Set objHdl = objLst.item(i)
for each child in objHdl.childNodes
Select case lcase(child.nodeName)
case "title"
title = child.text
case "link"
link = child.text
case "description"
description = child.text
'You can also use the following: author,category,comments,enclosure,guid,pubDate,source
End Select
next
Count = Count+1
if Count < NoOfResult+1 then
Response.Write "" & title & " " & description & ""
end if
Next
End Sub
Regards
Rashid Imran Bilgrami
http://www.bestvisualization.com
Comments
Post a Comment
Thanks for the Comments , Your review will display soon