以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DOM/SAX/XPath 』  (http://bbs.xml.org.cn/list.asp?boardid=11)
----  急:访问远程cgi(返回xml)的问题?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=11&rootid=&id=18495)


--  作者:winbowl
--  发布时间:5/18/2005 8:46:00 PM

--  急:访问远程cgi(返回xml)的问题?
访问sina的一个cgi,用下面的方法没有成功,请达人帮我看看,也可以在你的机器上试试,到底是什么问题,谢谢!在线等。
下面是我的asp网页:


<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
<TITLE>抓取页面测试6</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head>

<%
 Dim oXML
    Set oXML = Server.CreateObject("MSXML2.XMLHTTP")
    oXML.open "get", "http://partner.sina.com.cn/cgi-bin/search/search.cgi?_searchkey=aaa&sp=10&bg=1&partner=1000",false
    oXML.send
 
 response.Write(oXML.ResponseXML.xml)
  
 Dim xmlDoc
 Set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
 xmlDoc.async=false
 xmlDoc.ValidateOnParse=False

    If Not xmlDoc.Load(oXML.ResponseXML)  Then
  Response.Write(xmlDoc.ReadyState)
  Response.Write("装载xml失败")
  Set oXML = nothing
  Set xmlDoc= nothing
  Response.End()
 End If
 
 response.Write("装载成功")

 Set oXML = nothing
 Set xmlDoc= nothing
%>

<BODY>

</BODY>
</html>


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms