复制代码代码如下:
<%
'atom2rss.asp
'Penulis: Francescopassantino
'Email: [email protected]
'Blog: www.iteam5.net/blog
'StartDate: 17Sep2004
Subatom2RSS (URL)
Setobjxml = server.createObject ("msxml2.domdocument.3.0")
objxml.async = false
objxml.setProperty "serverHttpRequest", true
objxml.validateOnparse = true
Objxml.preservewhItespace = false
IFNOTOBJXML.LOAD (URL) Lalu
Response.write "<p> kesalahan <br> kode:" & _
objxml.parseeRror.ErrorCode & _
"<br> linea/col:" & _
objxml.parseeRror.line & "/" & _
objxml.parseeRror.linepos & "</p>"
Kalau tidak
rsstitle = "iteam5.net/blog"
rssdescription = "Blogsullenovit? Delsetoreinformation & CommunicationTechnologies"
rsslink = "http://www.iteam5.net/blog"
rsslanguage = "itu"
xml = "<? xmlversion =" "1.0" "encoding =" "UTF-8" "?> <rssversion =" "0.91" "> <nalnel> <itement>" & server.htmlencode (rsstitle) & "</itement> <creckrection>" & server .htmlencode (rssdescription) & "</cripence> <link>" & server.htmlencode (rsslink) & "</link> <sangage>" & server.htmlencode (RSSLanguage) & "</language>"
Setobjnodelist = objxml.geteLementsbyTagname ("entri")
Foreachobjnodeinobjnodelist
Foreachobjnode2inobjnode.childnodes
SelectCaseobjnode2.nodename
Kasus "dikeluarkan"
strdate = kiri (objnode2.firstchild.nodevalue, 10)
Kasus "tautan"
strurl = objnode2.getAttribute ("href")
Kasus "judul"
strtitle = objnode2.firstchild.nodevalue
'Sebaliknya konten "konten"
Kasus "Ringkasan"
strdescription = objnode2.firstchild.data
Foreachobjnode3inobjnode2.childnodes
SelectCaseobjnode3.nodename
Kasus "Div"
Strdescription = objnode3.text
Foreachobjnode4inobjnode3.childnodes
SelectCaseObjnode4.nodename
Kasus "a"