复制代码代码如下:
<%
'atom2rss.asp
'Auteur: FrancesCopassantino
'Courriel: [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) puis
Response.write "<p> Erreur <br> Code:" & _
objxml.parseerror.errorcode & _
"<br> linea / col:" & _
objxml.parseerror.line & "/" & _
objxml.parseerror.linepos & "</p>"
Autre
rsstitle = "iteam5.net/blog"
RSSDescription = "Blogsullenovit? DelsetToreInformation & CommunicationTechnologies"
rsslink = "http://www.iteam5.net/blog"
rssLanguage = "it"
xml = "<? xmlversion =" "1.0" "Encoding =" "UTF-8" "?> <rssversion =" "0,91" "> <Cannel> <Title>" & server.htmlencode (rsstitle) & "</ title> <escription>" & server .htmLencode (RSSDescription) & "</ Description> <ink>" & server.htmlencode (RSSLink) & "</ link> <angle>" & server.htmlencode (RSSLanguage) & "</ linguisse>"
SetObjNodeList = objxml.getElementsByTagName ("Entrée")
Foreachobjnodeinobjnodelist
Foreachobjnode2inobjnode.childnodes
SelectCaseObjNode2.NodeName
Cas "publié"
strdate = gauche (objnode2.firstchild.nodevalue, 10)
Cas "lien"
strurl = objnode2.getAttribute ("href")
Cas "titre"
strtitle = objnode2.firstchild.nodevalue
'Au lieu de "contenu"
Cas "Résumé"
strdescription = objnode2.firstchild.data
Foreachobjnode3inobjnode2.childnodes
SelectCaseObjNode3.NodeName
Cas "div"
Strdescription = objnode3.Text
Foreachobjnode4inobjnode3.childnodes
SelectCaseObjNode4.NodeName
Cas "A"