使用ASP读取XML文件

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

转自:http://goaler.xicp.net/ShowLog.asp?ID=481

你可能感兴趣的:(xml,Microsoft,asp.net,asp,XSL)