Things to know before developing MS XML applications.

XML is a method for putting structured data in a text file . Microsoft XML Core Services (MSXML)  adhere to the XML 1.0 standard.

MSXML can be installed both in replace mode and side by side. For example, starting MSXML4 all the versions are installed side by side. Which means that you system might have multiple versions of MSXML installed.

But When writing code try to use MSXML  v6 as it’s the latest one, If that is not installed on a target machine , MSXML3 is generally the best fallback. Because MSXML 1 and 2 are no longer supported by Microsoft, MSXML 5 is meant only for use in Office products. And MSXML 4 is kill bited.

To know the features of each of the MSXML versions you can visit


To find out what are the versions of XML installed in your system , you can use a tool called Xmlversion.exe or Xmlversiontext.exe. You can download it from the link .

To create a XML DOM object we use code like this “Dim xmlDoc As New Msxml2.DOMDocument30”

Here  Msxml2.DOMDocument30 is the progID we are using to refer a specific version of XML DOM.

MSXML has multiple versions and the ProgID is different in each on them usually in the form of ProjectName.ClassName.

For example –:

MSXML Version          PROGID

1.0                           Microsoft.XMLDOM

2.0                          Msxml.DOMDocument

3.0                          Msxml2.DOMDocument or Msxml2.DOMDocument.3.0

4.0                          Msxml2.DOMDocument.4.0

6.0                          Msxml2.DOMDocument.6.0

Visit for more details about MSXML  GUID and ProgID.

If you use version independent progID it will refer to the lowest version between MSXML1, MSXML2 and MSXML3. From MSXML4 and later you need to use the version specific ProgID.

Another thing you need to consider is the choise between XMLHTTP and ServerXMLHTTP. XMLHTTP is designed for client applications and relies on URLMon, which is built upon Microsoft Win32 Internet (WinInet). ServerXMLHTTP is designed for server applications and relies on a new HTTP client stack, WinHTTP.

ServerXMLHTTP is recommended for server applications and XMLHTTP is recommended for client applications. For example Use ServerXMLHTTP if you want to use it in a ASP page for example and use XMLHTTP if you want to call it in java script or vb script which is executed in client side.

WinInet limits the number of simultaneous connections that it makes to a single HTTP server using XMLHTTP to 4.But there are no such limits with ServerXMLHTTP. Other than that using ServerXMLHTTP, XML data can be exchanged between local and remote systems as a stream or as XML documents. And because the underlying protocol is HTTP or HTTPS, data can be exchanged between the systems that are behind firewalls. These kind of features maked ServerXMLHTTP suitable for use at server side.

Tracing of ServerXMLHTTP is possible using a tool called Winhttptracecfg. You can download it from


If you are writing a .net application try to use System.XML instead of MSXML. As using MSXML with .net application is not supported.



Author : Snehadeep , SQL Developer Engineer , Microsoft

Reviewed by : SMAT , SQL Escalation Services , Microsoft

Comments (1)