Friday, August 24, 2007

Msxml2.XMLHTTP vs. Microsoft.XMLHTTP

If you look at different implementations of Ajax, you’ll notice that some use “Microsoft.XMLHTTP”and some use “Msxml2.XMLHTTP” when targeting IE’s ActiveX control. So what’s the difference? Asit turns out, very little when written like that. While the “Microsoft” namespace is older than the“Msxml2” namespace, written like this both statements will target MSXML 3.0 (the most widelydistributed version of MSXML). The latest version of MSXML, though, is version 6.0 (released July2006). Vista ships with version 6.0 installed and it is available for download for XP, Win2k, andWin2k3. To target the latest and most secure version of MSXML, you must use“Msxml2.XMLHTTP.6.0” to create your XMLHttpRequest. Leaving the version number off on a systemwith 3.0 installed will always target MSXML 3.0 (even if 6.0 is installed)

No comments: