利用ASP从远程服务器上接收XML数据
时间:2007-08-23 12:49:00
利用ASP从远程服务器上接收XML数据
<%
dim objXML
dim objRootElement
dim strValue
dim strInetURL
dim strXML
dim item
strInetURL ="http://pf.inetsolution.com/inetactive2001/inetactive2001news.xml"
Dim HttpReq
set HttpReq = server.CreateObject("MSXML2.XMLHTTP")
HttpReq.open "GET", "http://pf.inetsolution.com/inetactive2001/inetactive2001news.xml", False
HttpReq.send
strXML = HttpReq.responseText
Set objXML = Server.CreateObject("Msxml2.DOMDocument")
objXML.validateonparse = true
objXML.async=false
objXML.loadXML(strXML)
if objXML.ParseError.errorCode <> 0 then
Response.Write("Error: " & objXML.parseError.reason & "<br>")
Response.Write("Code: 0x" & hex(objXML.parseError.errorCode) & "<br>")
Response.Write("At Line: " & objXML.parseError.line & "<br>")
Response.Write("At pos: " & objXML.parseError.linePos & "<br>")
else
set objRootElement = objXML.documentElement
if not isObject(objRootElement) then
Response.Write("no file loaded")
else
Response.Write(objRootElement.childnodes(0).text)
end if
end if
%>
标签:XML,asp,远程服务器
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
CSS pointer-events下层元素被点击
2010-04-11 22:31:00
如何实现文本的卷屏浏览?
2010-05-24 18:36:00
XML简易教程之二
2008-09-05 17:19:00
来看看如何防止采集
2007-08-19 20:11:00
HTML5中 b 和 i 标签将语义化
2008-03-16 13:43:00
详尽解析javascript event对象
2008-06-08 12:25:00
oracle 日期函数集合(集中版本)第1/2页
2009-06-19 17:23:00
Web标准在中国
2008-11-26 11:27:00
何处安放的Loading
2011-08-10 19:11:20
![](https://img.aspxhome.com/file/UploadPic/20118/10/1312963818456-14s.png)
用纯CSS3绘制的网站图标
2010-03-28 13:51:00
![](https://img.aspxhome.com/file/UploadPic/20103/28/css-social-media-icons-65s.png)
网站构成的基本元素—网页布局
2008-01-04 09:49:00
SQL 2008 FileStream数据类型
2008-10-28 21:07:00
详细讲解Access数据库远程连接的实用方法
2008-11-28 16:34:00
MySQL最新漏洞分析
2012-07-11 15:41:10
任意定制文本对齐方式:CSS Text Wrapper
2008-02-03 11:11:00
![](https://img.aspxhome.com/file/UploadPic/20082/3/200823115449282s.jpg)
网站tab导航的设计
2008-11-10 12:36:00
![](https://img.aspxhome.com/file/UploadPic/200811/10/tab1-53s.jpg)
实例:ASP与ACCESS链接
2008-11-21 16:10:00
css学习笔记:为什么在IE6下图片会往下掉一行
2009-06-19 12:50:00
![](https://img.aspxhome.com/file/UploadPic/20099/25/2009925225543206s.jpg)
纯CSS3文字渐变内发光投影效果
2011-08-24 20:15:10
![](https://img.aspxhome.com/file/UploadPic/20118/24/03-37s.jpg)
如何使用Index Server建立一个网站导航地图?
2010-06-05 12:39:00