复制代码代码如下:
<%
'Atom2rss.asp
'Autor: Francescopassantino
'Correo electrónico: [email protected]
'Blog: www.iteam5.net/blog
'StartDate: 17SEP2004
Subatom2rss (URL)
Setobjxml = server.createObject ("msxml2.domDocument.3.0")
objxml.async = falso
objxml.setProperty "Serverhttprequest", verdadero
objxml.ValidateOnParse = True
objxml.PreserveWhiteSpace = falso
Ifnotobjxml.load (url) entonces
Response.write "<p> Error <br> Código:" & _
objxml.parseError.Errorcode & _
"<br> Linea/col:" & _
objxml.parseError.line & "/" & _
objxml.parseError.linepos & "</p>"
Demás
rsstitle = "iteam5.net/blog"
rssdescription = "Blogsullenovit?
rsslink = "http://www.iteam5.net/blog"
rsslanguage = "it"
xml = "<? xmlversion =" "1.0" "encoding =" "utf-8" "?> <rssVersion =" "0.91" "> <nannel> <title>" & server.htmlencode (rsstitle) y "</title> <cription>" Server) .htmlencode (rssdescription) & "</cription> <ink>" & server.htmlencode (rsslink) & "</ink> <language>" & server.htmlencode (rsslanguage) & "</idioma>"
Setobjnodelist = objxml.getElementsBytagName ("Entrada")
Foreachobjnodeinobjnodelist
Foreachobjnode2inobjnode.childnodes
SelectCaseObjnode2.nodeName
Caso "emitido"
strdate = izquierda (objnode2.firstchild.nodeValue, 10)
Caso "Enlace"
strurl = objnode2.getAttribute ("href")
Caso "Título"
strtitle = objnode2.firstchild.nodeValue
'en su lugar de "contenido"
Caso "Resumen"
strdescription = objnode2.firstchild.data
Foreachobjnode3inobjnode2.childnodes
SelectCaseObjnode3.nodeName
Caso "div"
StrDescription = objnode3.Text
Foreachobjnode4inobjnode3.childnodes
SelectCaseObjnode4.nodeName
Caso "A"