<% Dim XML,sourceFile,strRetVal,source,Yahooprops,Yahooimage,counter,objLst,objHdl,intNoOfHeadlines sourceFile = "http://rss.news.yahoo.com/rss/topstories" Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP") xml.Open "GET", sourceFile, False xml.Send strRetVal = xml.responseText set source = Server.CreateObject("Microsoft.XMLDOM") source.async = false source.loadxml(strRetVal) If source.parseError.errorCode <> 0 Then Set XML = Nothing set source = Nothing Response.End End If IF Err.Number <> 0 Then Set XML = Nothing set source = Nothing Response.End End If Set objLst = source.getElementsByTagName("item") intNoOfHeadlines = objLst.Length Set Yahooprops = source.getElementsByTagName("channel") Set Yahooimage = source.getElementsByTagName("image") %>
<%=" & chr(34) & "%>
<% Set objLst = Nothing Set objHdl = Nothing Set Yahooprops = Nothing Set Yahooimage = Nothing set source = Nothing set XML = Nothing %>