<% ' Atom.asp ' Author: Francesco Passantino ' Email: francesco@iteam5.net ' Blog: www.iteam5.net/blog ' Start date: 25 Jan 2004 ' Last modified date: 18 May 2007 Sub atom(URL) Set objXML = Server.CreateObject("msxml2.DOMDocument.3.0") objXML.async = false objXML.setProperty "ServerHTTPRequest", True objXML.validateOnParse = true objXML.preserveWhiteSpace = false If Not objXML.Load(URL) Then Response.write "

ERROR
code: " & _ objXML.parseError.errorCode & _ "
Linea/Col: " & _ objXML.parseError.line & "/" & _ objXML.parseError.linepos & "

" Else Set objNodeList = objXML.getElementsByTagName("entry") For Each objNode In objNodeList For Each objNode2 In objNode.childNodes Select Case objNode2.nodeName Case "issued" strdate= left(objNode2.firstChild.nodevalue,10) Case "link" if linkchk=0 then strURL = objNode2.GetAttribute("href")&"?rss=1" linkchk=1 end if Case "title" strTitle = objNode2.firstChild.nodevalue 'istead of Case "content" Case "summary" strDescription = objNode2.firstChild.data For Each objNode3 In objNode2.childNodes Select Case objNode3.nodeName Case "div" StrDescription = objNode3.text For Each objNode4 In objNode3.childNodes Select Case objNode4.nodeName Case "a" linkable=objNode4.firstChild.text htmlink=" "& _ linkable&"" StrDescription = replace(StrDescription,linkable,htmlink) end select next end select next End Select Next if strdate<>prevstrdate then response.write ""&strdate&"