Everything you want to know about Chilliwack!
Click Here!
<%
Call getNews(100)
Sub getNEWS(howManyResults)
myRSSfile = "http://www.chilliwack.com/main/rsseventsfeed.xml"
Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.4.0")
xmlHttp.Open "Get", myRSSfile, 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
case "pubdate"
pubDate = child.text
'You can also use the following: author,category,comments,enclosure,guid,pubDate,source
End Select
next
kk = kk+1
if kk < howManyresults+1 then
dateandtime = mid(pubDate, 1, 16)
Response.Write "" & dateandtime & ":
• " & title & "
"
'Response.Write "" & pubDate & ":
• " & title & "
"
'Response.Write "
" & title & "
" & description
end if
Next
End Sub
%>