Installing and Registering the MSXML SDK
This topic describes requirements and other information related to installing and registering the MSXML SDK.
The following system components are required for developing with Microsoft XML Core Services (MSXML).
A supported 32-bit version of a Microsoft Windows® operating system product, such as Microsoft Windows® XP, Microsoft Windows® 2000, Microsoft Windows NT® 4.0, Microsoft Windows® Millennium Edition, or Microsoft Windows 98
Microsoft Internet Explorer 5.0 or later, if your solutions create output for display on the web browser
Microsoft Windows Script Host, if you want to view output without the web browser
Microsoft® Visual Studio®, if you create solutions with Visual Basic® or C++
Installing and Registering MSXML
Installing and registering MSXML will vary depending on two factors:
The version of MSXML you intend to target your application to use.
Other versions of Microsoft products, such as Microsoft Windows or Microsoft Office, that are installed on computers you intend to use to develop or deploy your application.
Installing and Registering MSXML 3.0
For version 3.0, MSXML installs as a Windows system component with Windows XP and Windows Server 2003. For earlier versions of Windows, such as Windows 98, Windows Millenium Edition (ME) or Windows 2000, you can install or redistribute the latest SP release of MSXML 3.0 as a separate download.
To download the latest SP version of MSXML 3.0, see the XML General Downloads page of MSDN Library Online at http://msdn.microsoft.com/downloads/.
Installing and Registering MSXML 4.0
For version 4.0 and later, MSXML must be installed separately on all computers, regardless of which version of Windows is active.
MSXML 4.0 and later installs in side-by-side mode. This mode protects the quality of applications that currently use earlier versions of MSXML, such as MSXML 3.0. This feature is important because different versions of the Windows operating system and Microsoft Internet Explorer are released with different versions of MSXML.
Side-by-side mode also allows you to decide which version of the parser to use in your code. For example, when you download and install MSXML 4.0 from the Microsoft XML Download Center, the setup program installs two files onto your computer: msxml4.dll and either msxml4a.dll (if the computers runs under Windows 9x/ME) or msxml4r.dll (if the computers runs under Windows NT/2000/XP or Windows Server 2003). The setup program registers the msxml4.dll file in the computer's registry.
After you install the MSXML 4.0, calling applications must use version-dependent CLSIDs and ProgIDs to reference and use msxml4.dll. This ensures stability in your applications. For example, you might have legacy coding that uses version-independent CLSIDs and ProgIDs such as the following JScript code:
var xml = new ActiveXObject("Msxml2.DOMDocument");
var xsl = new ActiveXObject("Msxml2.DOMDocument");
Even if MSXML 4.0 is deployed to client computers, the previous code would continue to run, and to call an earlier version of MSXML—such as version 2.0, 2.6, or 3.0—if one is installed and available. The exact version depends on other details, such as whether applications have been installed that are dependent on a specific version of MSXML, and that reconfigure the system to use that version by default. For more information and a list of CLSIDs and ProgIDs, see GUID and ProgID Information.
To download the latest SP version of MSXML 4.0, see the XML General Downloads page of MSDN Library Online at http://msdn.microsoft.com/downloads/.
Installing and Registering MSXML 5.0 for Microsoft Office Applications
For version 5.0, MSXML installs (as it did for MSXML 4.0) in side-by-side mode. MSXML 5.0 for Microsoft Office Applications is only available with Microsoft Office 2003.
For more information about Microsoft Office 2003, see the Microsoft Office home page at http://www.microsoft.com/office.
Using Version-Dependent ProgIDs
The following Microsoft JScript® code shows how to create an instance of the DOMDocument object using the version-dependent ProgID, Msxml2.DOMDocument.4.0.
var xml = new ActiveXObject("Msxml2.DOMDocument.4.0");
var xsl = new ActiveXObject("Msxml2.DOMDocument.4.0");
This ProgID is for MSXML 4.0. For a full example of how to call and use version-dependent ProgIDs to load and transform XML documents from script, see Initiate XSLT in a Script.
In a similar way, to code to MSXML 2.6, use the following JScript syntax:
var xml = new ActiveXObject("Msxml2.DOMDocument.2.6");
var xsl = new ActiveXObject("Msxml2.DOMDocument.2.6");
For more information about ProgIDs, see GUID and ProgID Information.
Ensure the stability of your applications by updating older version-independent CLSIDs and ProgIDs to MSXML 4.0 or later version-dependent CLSIDs and ProgIDs. Otherwise, mixing the version-dependent and version-independent CLSIDs or ProgIDs in your code can cause problems with your application.
Limitation of Side-by-Side Mode
Currently, with MSXML 4.0 installed in side-by-side mode, Microsoft® Internet Explorer does not provide full MSXML support for data islands. When you create a data island on a Web page and reference it as an object, the browser creates that object based on the version of MSXML used by the browser. For Internet Explorer 5.0 or later, this can be MSXML 2.0 or MSXML 2.5, both of which support Extensible Stylesheet Language (XSL), but not XSLT.