MSXML 嗅探器

<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>MSXML Sniffer</title>
<script language="JavaScript">
function sniff(){
var xml = "<?xml version=/"1.0/" encoding=/"UTF-16/"?><cjb></cjb>";
var xsl = "<?xml version=/"1.0/" encoding=/"UTF-16/"?><x:stylesheet version=/"1.0/" xmlns:x=/"http://www.w3.org/1999/XSL/Transform/" xmlns:m=/"urn:schemas-microsoft-com:xslt/"><x:template match=/"//"><x:value-of select=/"system-property('m:version')/" /></x:template></x:stylesheet>";
//var xsl = "<?xml version=/"1.0/" encoding=/"UTF-16/"?><x:stylesheet version=/"1.0/" xmlns:x=/"http://www.w3.org/TR/WD-xsl/"></x:stylesheet>";

var x = null;

try{
x = new ActiveXObject("Msxml2.DOMDocument");
x.async = false;
if (x.loadXML(xml)){
sniffer.msxml2.checked = true;
document.getElementById("advice1").innerText = "";
}
}catch(e){
document.getElementById("msxml2reason").innerText = e.description;
document.getElementById("advice2").innerText = "";
}

try{
x = new ActiveXObject("Msxml2.DOMDocument.2.6");
x.async = false;
if (x.loadXML(xml))
sniffer.msxml2v26.checked = true;
}catch(e){document.getElementById("msxml2v26reason").innerText = e.description}

try{
x = new ActiveXObject("Msxml2.DOMDocument.3.0");
x.async = false;
if (x.loadXML(xml))
sniffer.msxml2v30.checked = true;
}catch(e){document.getElementById("msxml2v30reason").innerText = e.description}

try{
x = new ActiveXObject("Msxml2.DOMDocument.4.0");
x.async = false;
if (x.loadXML(xml))
sniffer.msxml2v40.checked = true;
}catch(e){document.getElementById("msxml2v40reason").innerText = e.description}

try{
x = new ActiveXObject("Microsoft.XMLDOM");
x.async = false;
if (x.loadXML(xml))
sniffer.msxml.checked = true;
}catch(e){document.getElementById("msxmlreason").innerText = e.description}

try{
var s = new ActiveXObject("Microsoft.XMLDOM");
s.async = false;
if (s.loadXML(xsl)){
try{
var op = x.transformNode(s);
if (op.indexOf("stylesheet") == -1){
sniffer.replace.checked = true;
document.getElementById("replacereason").innerText = "Replace V" + op.substr(op.lastIndexOf(">")+1);
document.getElementById("advice2").innerText = "";
}else
if (sniffer.msxml2.checked)
document.getElementById("replacereason").innerText = "Side-By-Side";
}catch(e){
if (sniffer.msxml2.checked)
document.getElementById("replacereason").innerText = "Side-By-Side";
}
}
}catch(e){}
}
</script>

</head>

<body οnlοad="sniff()" bgcolor="#2288ff">

<h1 align="center"><font color="#000000">MSXML Sniffer</font></h1>
<form name="sniffer">
<div align="center">
<center>
<table border="1" width="1%">
<tr>
<td width="1%" nowrap style="color:#000000;">MSXML</td>
<td width="1%"><input type="checkbox" name="msxml" value="ON" disabled></td>
<td id="msxmlreason" nowrap style="color:#000000;">Installed</td>
</tr>
<tr>
<td width="1%" nowrap style="color:#000000;">MSXML2</td>
<td width="1%"><input type="checkbox" name="msxml2" value="ON" disabled></td>
<td id="msxml2reason" nowrap style="color:#000000;">Installed</td>
</tr>
<tr>
<td width="1%" nowrap style="color:#000000;">MSXML2 v2.6</td>
<td width="1%"><input type="checkbox" name="msxml2v26" value="ON" disabled></td>
<td id="msxml2v26reason" nowrap style="color:#000000;">Installed</td>
</tr>
<tr>
<td width="1%" nowrap style="color:#000000;">MSXML2 v3.0</td>
<td width="1%"><input type="checkbox" name="msxml2v30" value="ON" disabled></td>
<td id="msxml2v30reason" nowrap style="color:#000000;">Installed</td>
</tr>
<tr>
<td width="1%" nowrap style="color:#000000;">MSXML2 v4.0</td>
<td width="1%"><input type="checkbox" name="msxml2v40" value="ON" disabled></td>
<td id="msxml2v40reason" nowrap style="color:#000000;">Installed</td>
</tr>
<tr>
<td width="1%" nowrap style="color:#000000;">Mode</td>
<td width="1%"><input type="checkbox" name="replace" value="ON" disabled></td>
<td id="replacereason" nowrap style="color:#000000;">&nbsp;</td>
</tr>
</table>
</center>
</div>
</form>
<p id="advice1" style="color:#000000;">You are using an old version of MSXML. It is recomended that you download
an upgrade from <a href="http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/msdn-files/027/001/596/msdncompositedoc.xml" target="xxx">Microsoft.</a>
Or you can use the automatic <a href="JavaScript:parent.changeContent1('/xml/utils/instalmsxml.xml');">Install MSXML</a> utility in this section.</p>
<p id="advice2" style="color:#000000;">Although you have the new version of MSXML you are running it in "side-by-side" mode.
To get the full benifits of this new version you should run xmlinst (from Microsoft to switch to
"replace" mode.</p>
<p style="color:#000000;">Because this page is an HTML file you can save it or do a right-click
view source and save that. <br />
If you need to know what versions your hosting service is using you may want to
<a target="xxx" οnclick="JavaScript:parent.download(this, '/xml/utils/msxml_sniffer.asp.zip');" style="color:blue;cursor:hand">
download</a> this asp file, and upload it to your hosting service.
</p>
<img src="/cgi-bin/benbayes/counter.pl?xml_msxml_sniffer-1" height="0" width="0" border="0" />
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值