ASP调用远程XML数据的代码(alexa排名数据) 复制代码 代码如下: <% URL="http://news.163.com/special/00011K6L/rss_newstop.xml" Set xml = Server.CreateObject("Microsoft.XMLHTTP") xml.Open "GET", url, False xml.Send Set xmlDom = server.createObject("microsoft.xmldom") xmlDom.async=False xmlDom.ValidateOnParse=false xmlDom.load(xml.responseXML) if xmlDom.ReadyState>2 Then set oItem=xmlDom.getElementsByTagName("item") %>
<% for i=0 to oItem.length-1 word=oItem(i).childNodes(0).text title=oItem(i).childNodes.item(0).text Link=oItem(i).childNodes.item(1).text pubDate=oItem(i).childNodes.item(3).text %>