复制代码代码如下::
<%
'atom2rs.asp
'Autor: FrancesCopassantino
'E -Mail: [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) dann
Response.write "<p> Fehler <br> Code:" & _
objxml.parseerror.Errorcode & _
"<br> linea/col:" & _
objxml.parseerror.line & "/" & _
objxml.parseerror.linepos & "</p>"
Anders
rstitle = "iteam5.net/blog"
rssdescription = "blogsullenovit?
rsslink = "http://www.iteam5.net/blog"
RSSLUGUAGE = "It"
xml = "<? xmlversion =" "1.0" "coding =" "utf-8"?> <rsSversion = "" 0.91 ""> <Channel> <titels> "& server.htmlencode (RSstitle) &" </title> <beschreibung> "& Server .htmlencode (RSSDescription) & "</Beschreibung> <Link>" & server.htmlencode (RSSLINK) & "</link> <Pl." & Server.htmlenCode (RSSUGUGUAGE) & "</langual>"
SetObjnodelist = objxml.getElementsByTagName ("Eintrag")
Foreachobjnodeinobjnodelist
ForeachObjnode2inobjnode.childnodes
SelectCaseObjnode2.Nodename
Fall "ausgestellt"
strdate = links (objnode2.Firstchild.nodeValue, 10)
Fall "Link"
StRURL = Objnode2.GetAttribute ("href")
Fall "Titel"
Strtitle = Objnode2.Firstchild.nodeValue
'Stattdessen "Inhalt"
Fall "Zusammenfassung"
strDescription = objnode2.Firstchild.data
ForeachObjnode3inobjnode2.Childnodes
SelectCaseObjnode3.Nodename
Fall "Div"
StrDescription = objnode3.text
ForeachObjnode4inobjnode3.Childnodes
SelectCaseObjnode4.Nodename
Fall "a"