主頁 > 知識庫 > atom2rss.asp

atom2rss.asp

熱門標(biāo)簽:成都ai外呼系統(tǒng)線路 沈陽三五防封電銷卡 廣東語音外呼系統(tǒng)公司 鄢陵學(xué)校如何做地圖標(biāo)注 虛擬電話外呼系統(tǒng) 鄭州智能外呼電銷機(jī)器人廠家 長春公司外呼系統(tǒng)中心 云南便宜外呼系統(tǒng)平臺 沈陽電話機(jī)器人公司
復(fù)制代碼 代碼如下:

%
' atom2rss.asp
' Author: Francesco Passantino
' Email: francesco@iteam5.net
' Blog: www.iteam5.net/blog
' Start date: 17 Sep 2004


Sub atom2rss(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 "P>ERRORbr>code: "  _
objXML.parseError.errorCode  _
"br>Linea/Col: "  _
objXML.parseError.line  "/"  _
objXML.parseError.linepos  "/P>"

Else

rsstitle="iteam5.net/blog"
rssdescription="Blog sulle novit?del settore Information  Communication Technologies"
rsslink="http://www.iteam5.net/blog"
rsslanguage="it"

xml= "?xml version=""1.0"" encoding=""UTF-8""?>rss version=""0.91"">channel>title>"server.htmlencode(rsstitle)"/title>description>"server.htmlencode(rssdescription)"/description>link>"server.htmlencode(rsslink)"/link>language>"server.htmlencode(rsslanguage)"/language>"

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"
    strURL = objNode2.GetAttribute("href")
    Case "title"
    strTitle = objNode2.firstChild.nodevalue

    'instead 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=" a href='" _
                objNode4.GetAttribute("href")"'>" _
                linkable"/a>"
                StrDescription = replace(StrDescription,linkable,htmlink)
            end select
            next
        end select
    next
    End Select
Next

xml= xml  "item>"
xml=xml  "title>![CDATA["  server.htmlencode(strTitle)  "]]>/title>"
xml=xml  "description>![CDATA["  server.htmlencode(strDescription)  "]]>/description>"
xml=xml  "link>![CDATA["  server.htmlencode(strURL)  "]]>/link>/item>"

strTitle = ""
strURL = ""
strDescription = ""

Next

xml = xml  "/channel>/rss>"
response.ContentType = "text/xml"
response.write xml

set objNodeList = Nothing

End if
End sub

call atom2rss("http://www.iteam5.net/blog/feed.xml")

%>

標(biāo)簽:四平 朝陽 孝感 馬鞍山 湖北 平頂山 防城港 遼陽

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《atom2rss.asp》,本文關(guān)鍵詞  atom2rss.asp,atom2rss.asp,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《atom2rss.asp》相關(guān)的同類信息!
  • 本頁收集關(guān)于atom2rss.asp的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章