close
>
<%

Dim objXMLHTTP, strReturn
Set objXMLHTTP = server.CreateObject("Microsoft.XMLHTTP")

objXMLHTTP.Open "Get", "http://tw.news.yahoo.com/rss/technology", False
objXMLHTTP.setRequestHeader "Content-Type", "text/xml"
objXMLHTTP.setRequestHeader "charset", "UTF-8"
objXMLHTTP.Send
'Response.charSet ="UTF-8"
aaa = objXMLHTTP.responseText
Set objXMLHTTP = Nothing

set xmldoc = Server.CreateObject("MSXML2.DOMDocument")
xmldoc.loadXML(aaa)

Set root = xmlDoc.documentElement

For Each nodeX in root.selectnodes("/rss/channel/item")
Response.Write "<a href="&NodeX.childNodes.Item(1).Text&">"& NodeX.childNodes.Item(0).Text & "</A><br>"
Next

Set xmldoc = Nothing

%>


好用好用的語法

arrow
arrow
    全站熱搜

    kueihua 發表在 痞客邦 留言(0) 人氣()