微软XML分析程序介绍
李永海([email protected])
目前微软XML分析程序被称为Microsoft XML Core Services(MSXML),以前被叫做Microsoft XML Parser,可见XML在微软产品中的地位是越来越重要,已经不再仅仅作为解析器了。
MSXML最早的版本是1.0,最新的版本为4.0 SP1
版本列表:
Version |
File name |
File version |
1.0 |
msxml.dll |
4.71.1712.5 |
1.0a |
msxml.dll |
4.72.2106.4 |
1.0 Service Pack 1 (SP1) |
msxml.dll |
4.72.3110.0 |
2.0 |
msxml.dll |
5.0.2014.0206 |
2.0a |
msxml.dll |
5.0.2314.1000 |
2.0b |
msxml.dll |
5.0.2614.3500 |
2.5 Beta 2 |
msxml.dll |
5.0.2919.38 |
2.5a |
msxml.dll |
5.0.2919.6303 |
2.5 |
msxml.dll |
5.0.2920.0 |
2.5 Service Pack 1 (SP1) |
msxml.dll |
8.0.5226 |
2.6 January 2000 Web Release |
msxml2.dll (January Web Release) |
7.50.4920.0 |
2.6 Beta 2 |
msxml2.dll |
8.0.5207.3 |
2.6 |
msxml2.dll |
8.0.6518.1 |
3.0 March 2000 Web Release |
msxml3.dll (March Web Release) |
7.50.5108.0 |
3.0 May 2000 Web Release |
msxml3.dll (May Web Release) |
8.0.7309.3 |
3.0 July 2000 Web Release |
msxml3.dll (July Web Release) |
8.0.7520.1 |
3.0 September 2000 Web Release |
msxml3.dll (September Web Release) |
8.0.7728.0 |
3.0 Release |
msxml3.dll |
8.0.7820.0 |
4.0 SP1 |
msxml4.dll |
4.10.9404.0 |
随微软产品发布的msxml版本
Operating system |
Internet Explorer |
MSXML version |
Not applicable |
Internet Explorer 4.0 |
1.0 |
Windows 95, OEM Service Release 2.5 |
Internet Explorer 4.0a |
1.0a |
Not applicable |
Internet Explorer 4.01, Service Pack 1 (SP1), |
2.0 |
Office 2000 |
Internet Explorer 5.0a |
2.0a |
Windows 98, Second Edition |
Internet Explorer 5.0b |
2.0b |
Windows 95, Windows 98, or Windows NT 4.0 |
Internet Explorer 5.01 |
2.5a |
Windows 2000 |
Internet Explorer 5.01 |
2.5 |
Windows 2000 |
Internet Explorer 5.01, Service Pack 1 (SP1) |
2.5 Service Pack 1 (SP1) |
Windows 95, Windows 98, Windows NT 4.0, Windows 2000, or Windows 2000 Service Pack 1 (SP1) |
Internet Explorer 5.5 |
2.5 Service Pack 1 (SP1) |
XML versions shipped with Microsoft SQL Server™ SQL Server
MSXML version | |
Microsoft SQL Server 2000, Beta 2 |
2.6 Beta 2 |
Microsoft SQL Server 2000 |
2.6 |
XML versions shipped with Microsoft BizTalk™ Server
BizTalk Server |
MSXML version |
BizTalk (Technology Preview) |
2.6 |
BizTalk (Beta) |
2.6 |
msxml 4.0在安装时不会覆盖以前老版本的msxml.所以各个版本的msxml可以共存。目前IE缺省的XML解析器是msxml 2.0或者msxml 3.0,即使安装了msxml 4.0也是这样。如果想使用最新安装的msxml 4.0,就必须使用脚本,利用版本相关的ProgID来创建对象
下面列出一些常用的ProgID与对应的对象:
Object Name |
ProgID |
DOMDocument(msxml 3.0) |
MSXML2.DOMDocument |
IE缺省的DOMDocument |
Microsoft.XMLDOM, MSXML.DOMDocument |
DomDocument(msxml 4.0) |
Msxml2.DOMDocument.4.0 |
DOMDocument(msxml 3.0)( version dependent) |
MSXML2.DOMDocument.3.0 |
IE缺省的XMLHTTP |
Microsoft.XMLHTTP |
XMLHTTP(msxml 3.0) |
MSXML2.XMLHTTP |
XMLHTTP(msxml 3.0)(version dependent) |
MSXML2.XMLHTTP.3.0 |
XMLHTTP(msxml 4.0) |
Msxml2.XMLHTTP.4.0 |
由此可以看出,如果使用IE缺省的XML Parser对象能解决问题的,就最好使用。创建对象的时候一定要注意版本。另外,msxml 4.0 beta 2 release及以后的版本将去除version-independent ProgIDs and GUIDs.
目前我们常说的XSL其实是XSLT 1.0.XSL最早是微软提出来的标准(现在是W3C标准),但由于太复杂,最后衍生出了比较有针对性的XSLT.这就好像XML从SGML中衍生出一样。下图可以很好的表示这种关系:
XSL-FO功能很是强大,目前APACHE ORG正在做的一个开源项目就是可以把XML文件通过fo转换成多格式文档的软件,已经实现的有PDF,SVG等格式。
xmlns:xsl=http://www.w3.org/1999/XSL/Transform 标准指的是XSLT,
xmlns:xsl="http://www.w3.org/TR/WD-xsl 标准指的是XSL.
msxml 2.6及以前的版本仅仅支持XSL. msxml 3.0及以后的版本才支持XSLT
可以在微软站点上下载发布用的CAB包,然后嵌入下段代码:
<object id="MSXML4"
classid="clsid:88d969c0-f192-11d4-a65f-0040963251e5"
codebase="msxml4.cab#version=4,10,9404,0
type="application/x-oleobject"
STYLE="display: none">
</object>
如果是其他版本的msxml cab package,请注意修改代码中相应的地方.
本文地址:http://com.8s8s.com/it/it45935.htm