当前位置 : 主页 > 编程语言 > java >

使用ASP读取XML文件

来源:互联网 收集:自由互联 发布时间:2022-08-10
dim objHTTP,objXML,objXSL Set objXSL = Server.CreateObject("Microsoft.XMLDOM") objXSL.async=False objXSL.load(Server.MapPath("rss.xsl")) set objHTTP = Server.CreateObject("Microsoft.XMLHTTP") objHTTP.open "GET",objURL, false objHTTP.send se
dim objHTTP,objXML,objXSL
Set objXSL = Server.CreateObject("Microsoft.XMLDOM")
objXSL.async=False
objXSL.load(Server.MapPath("rss.xsl"))

set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.open "GET",objURL, false
objHTTP.send

set objXML = objHTTP.responseXML
objHTML = objXML.transformNode(objXSL)
objHTML = replace(objHTML,"""","'")

Set objHTTP = Nothing

'objHTML = Server.HTMLEncode( objHTML )

%>


var rsscode;

rsscode="<%=objHTML%>";
RSSbox.innerHTML = "";
if(rsscode == "")
{
RSSbox.innerHTML = "nothing found";
}
RSSbox.innerHTML = rsscode
网友评论