473,670 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Msxml*.XMLHTTP vs. Microsoft.XMLHT TP

<http://www.quirksmode. org/book/printable/xmlhttp.txtshow s two
alternatives to Microsoft.XMLHT TP - Msxml2.XMLHTTP and Msxml3.XMLHTTP.
If my understanding is correct, the different numbers refer to the
version of Microsoft's XML parser and that Microsoft.XMLHT TP refers to
the latest installed version.

This makes me wonder why sites like
<http://developer.apple .com/internet/webcontent/xmlhttpreq.html opt to
use Msxml2.XMLHTTP, first, and then use Microsoft.XMLHT TP as a
fallback. If v2 was the latest version of the XML parser,
Microsoft.XMLHT TP would refer to it just as Msxml2.XMLHTTP does. If v3
or v4 were the latest versions, Microsoft.XMLHT TP would refer to either
of those. So why give v2 preference? Wouldn't it be better to use v4
and then v3, before using v2? Wouldn't it be better just to reference
Microsoft.XMLHT TP and not Msxml*.XMLHTTP?

Nov 7 '06 #1
13 25214

yawnmoth wrote:
<http://www.quirksmode. org/book/printable/xmlhttp.txtshow s two
alternatives to Microsoft.XMLHT TP - Msxml2.XMLHTTP and Msxml3.XMLHTTP.
If my understanding is correct, the different numbers refer to the
version of Microsoft's XML parser and that Microsoft.XMLHT TP refers to
the latest installed version.

This makes me wonder why sites like
<http://developer.apple .com/internet/webcontent/xmlhttpreq.html opt to
use Msxml2.XMLHTTP, first, and then use Microsoft.XMLHT TP as a
fallback. If v2 was the latest version of the XML parser,
Microsoft.XMLHT TP would refer to it just as Msxml2.XMLHTTP does. If v3
or v4 were the latest versions, Microsoft.XMLHT TP would refer to either
of those. So why give v2 preference? Wouldn't it be better to use v4
and then v3, before using v2? Wouldn't it be better just to reference
Microsoft.XMLHT TP and not Msxml*.XMLHTTP?
Hi

I don't know what the correct answer to this is, but you should have a
look at tbe MS XML Web Log as to the recommended ProgIDs at the moment.

<URL:http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx>
Regards
Julian Turner

Nov 7 '06 #2

Julian Turner wrote:
[snip]
I don't know what the correct answer to this is, but you should have a
look at tbe MS XML Web Log as to the recommended ProgIDs at the moment.

<URL:http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx>

See the following quote at the end of the above entry:-

"MSXML2 vs. Microsoft namespace - I've also seen a lot of code that
instantiates the "Microsoft.XMLH TTP" ActiveX object rather than the
MSXML2.XMLHTTP. 3.0 or MSXML2.XMLHTTP. 6.0 if you're using 6.0. The
"Microsoft" namespace is actually older and is only implemented in
MSXML3 for legacy support. It's unfortunate we used the "better"
name on the older version, but stick to the "msxml2" namespace when
instantiating objects."

Seems to suggest that using Microsoft.XMLHT TP is actually out of date.

Regards

Julian

Nov 7 '06 #3
VK

Julian Turner wrote:
Seems to suggest that using Microsoft.XMLHT TP is actually out of date.
Right: that is for the very first implementations of IXMLHTTPRequest so
should be used (if even used) as the last option.

For modern implementations it is Msxml library activated by
Msxml2.XMLHTTP or Msxml3.XMLHTTP etc.

As it can be very problematic to detect the current version of the
library (2?, 3?,..., 6?) Microsoft made "Msxml2.XMLHTTP " to be the
universal alias *for the current library on the given client* This way
you can use new ActiveXObject(' Msxml2.XMLHTTP' ) and do not worry that
the current livrary version is say Msxml4

Nov 7 '06 #4
VK wrote:
For modern implementations it is Msxml library activated by
Msxml2.XMLHTTP or Msxml3.XMLHTTP etc.
There is no program id 'Msxml3.XMLHTTP '. If you want to use the client
side XMLHTTP component of MSXML 3 then the program id is
'Msxml2.XMLHTTP .3.0'. For MSXML 4 it is 'Msxml2.XMLHTTP .4.0', for MSXML
5 it is 'Msxml2.XMLHTTP .5.0', and for MSXML 6 it is 'Msxml2.XMLHTTP .6.0'.
See
<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/xmlsdk/html/e5533515-e525-4781-b68b-1ecfefdd1e89.as p>
for the MSXML 3 program ids and
<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/xmlsdk/html/5016cf75-4358-4c1f-912e-c071aa0a0991.as p>
for the introduction to that section.
As it can be very problematic to detect the current version of the
library (2?, 3?,..., 6?) Microsoft made "Msxml2.XMLHTTP " to be the
universal alias *for the current library on the given client* This way
you can use new ActiveXObject(' Msxml2.XMLHTTP' ) and do not worry that
the current livrary version is say Msxml4
That is not true, MSXML 4 and later components can only be instantiated
with version specific program ids e.g. 'Msxml2.XMLHTTP .4.0'.
To quote from above URL:
"After you install MSXML 4.0 or later, applications that use
version-independent ProgIDs continue to run using the most recent
version of MSXML prior to version 4.0. Typically, for most current
Windows systems, this will be MSXML 3.0"

So the version independent version id 'Msxml2.XMLHTTP ' is bound to MSXML
3 or earlier but never to later versions (MSXML 4 or later) even if
these are installed.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 7 '06 #5
VK
Martin Honnen wrote:
That is not true, MSXML 4 and later components can only be instantiated
with version specific program ids e.g. 'Msxml2.XMLHTTP .4.0'.
To quote from above URL:
"After you install MSXML 4.0 or later, applications that use
version-independent ProgIDs continue to run using the most recent
version of MSXML prior to version 4.0. Typically, for most current
Windows systems, this will be MSXML 3.0"

So the version independent version id 'Msxml2.XMLHTTP ' is bound to MSXML
3 or earlier but never to later versions (MSXML 4 or later) even if
these are installed.
Right, sorry and thanks for the correction. If it is necessary to use
Microsoft XML Core Services ver.4 or above (say for specific XSLT
transformations client-side) it is necessary to use the correct ProgID.

If it is a regular ajaxoid used just to grab data / send data to the
server than the version is not important and ProgID 'Msxml2.XMLHTTP '
covers it all.

Nov 7 '06 #6

Martin Honnen wrote:
<snip>
There is no program id 'Msxml3.XMLHTTP '. If you want to use the client
side XMLHTTP component of MSXML 3 then the program id is
'Msxml2.XMLHTTP .3.0'. For MSXML 4 it is 'Msxml2.XMLHTTP .4.0', for MSXML
5 it is 'Msxml2.XMLHTTP .5.0', and for MSXML 6 it is 'Msxml2.XMLHTTP .6.0'.
If there's no Msxml3.XMLHTTP program id, I assume that means that
<http://www.quirksmode. org/book/printable/xmlhttp.txtis in error when
it references it?

Also, I assume the program id for the client side XMLHTTP component of
MSXML 1 is Microsoft.XMLHT TP?
That is not true, MSXML 4 and later components can only be instantiated
with version specific program ids e.g. 'Msxml2.XMLHTTP .4.0'.
To quote from above URL:
"After you install MSXML 4.0 or later, applications that use
version-independent ProgIDs continue to run using the most recent
version of MSXML prior to version 4.0. Typically, for most current
Windows systems, this will be MSXML 3.0"

So the version independent version id 'Msxml2.XMLHTTP ' is bound to MSXML
3 or earlier but never to later versions (MSXML 4 or later) even if
these are installed.
Does Msxml2.XMLHTTP bind itself to MSXML 1, as well?

If so, what's the point of referencing Microsoft.XMLHT TP at all?
Shouldn't Msxml2.XMLHTTP always exist when Microsoft.XMLHT TP does?

If not, then would it be more accurate to say that Msxml2.XMLHTTP is
bound to MSXML 2 and 3?

Finally, if one wanted to use the latest version of MSXML (even though
it might not be necessary), I assume the program id's ought to be
checked in this order?:

Msxml2.XMLHTTP. 6.0
Msxml2.XMLHTTP. 5.0
Msxml2.XMLHTTP. 4.0
Msxml2.XMLHTTP
(assuming Msxml2.XMLHTTP is not bound to MSXML 1) Microsoft.XMLHT TP

Nov 7 '06 #7
yawnmoth wrote:
If there's no Msxml3.XMLHTTP program id, I assume that means that
<http://www.quirksmode. org/book/printable/xmlhttp.txtis in error when
it references it?
It does not help having that in there as that program id does not exist
but as the code that uses it has try/catch the script will not give an
error but rather go on and create a different component.

what's the point of referencing Microsoft.XMLHT TP at all?
Original IE 5 and IE 5.5 installation have MSXML versions that support
that program id but not the program id Msxml2.XMLHTTP.

For all the details I have already pointed to
<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/xmlsdk/html/5016cf75-4358-4c1f-912e-c071aa0a0991.as p>
then there was already a link posted to a recent blog entry of the MS
XML team on what they want to be used currently.
Finally this knowledge base entry
<http://support.microso ft.com/kb/269238/en-us>
lists the different versions and which versions are or were included
with which other products (e.g. IE versions).


--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 7 '06 #8
>
>what's the point of referencing Microsoft.XMLHT TP at all?

Original IE 5 and IE 5.5 installation have MSXML versions that support
that program id but not the program id Msxml2.XMLHTTP.

For all the details I have already pointed to
<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/xmlsdk/html/5016cf75-4358-4c1f-912e-c071aa0a0991.as p>
then there was already a link posted to a recent blog entry of the MS XML
team on what they want to be used currently.
Finally this knowledge base entry
<http://support.microso ft.com/kb/269238/en-us>
lists the different versions and which versions are or were included with
which other products (e.g. IE versions).

So from what I can see, this should cover reasonable possiblilities?

// create XMLHttpRequest request
function createXMLHttpRe quest()
{
if ( window.XMLHttpR equest ) // IE7 and all of interest
{
try { return new window.XMLHttpR equest(); }
catch(e) {alert("window. XMLHttpRequest failed"+e.messa ge);}
}
else // old IE
{
try { return new ActiveXObject(" Microsoft.XMLHT TP"); }
catch (e) {}
try { return new ActiveXObject(" Msxml2.XMLHTTP" ); }
catch (e) {alert("Platfor m not supported"+e.me ssage);}
}
}

The only 'problem' being that the window.XMLHttpR equest
seems to work slightlly diferent in IE7 than others by not
allowing local rurl.

Thanks and Best Regards,
Joe
Nov 7 '06 #9

Joe D Williams wrote:
<snip>
So from what I can see, this should cover reasonable possiblilities?

// create XMLHttpRequest request
function createXMLHttpRe quest()
{
if ( window.XMLHttpR equest ) // IE7 and all of interest
{
try { return new window.XMLHttpR equest(); }
catch(e) {alert("window. XMLHttpRequest failed"+e.messa ge);}
}
else // old IE
{
try { return new ActiveXObject(" Microsoft.XMLHT TP"); }
catch (e) {}
try { return new ActiveXObject(" Msxml2.XMLHTTP" ); }
catch (e) {alert("Platfor m not supported"+e.me ssage);}
}
}
Per this discussion, it seems that it'd be better to use
Microsoft.XMLHT TP only if Msxml2.XMLHTTP is unavailable (you're doing
it in the other direction), since Microsoft.XMLHT TP refers to an older
version of Microsoft's XML Core Services then is Msxml2.

Nov 7 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3236
by: Irene | last post by:
Hi, I have an asp page that allows a user to search for info in a DB and add info to a DB. The search uses "ADODB.Connection" objects in the page, but the add will use a call to an isapi dll via the "Microsoft.XMLHTTP" object. The results of the isapi dll will be displayed to the user without refreshing the asp page. I have a code snippet below for the isapi call. WHat is happening is that the xmlhttp.responseText from the snippet...
12
13788
by: Botan Guner | last post by:
Hi all, Here is the problem, i'm using Microsoft.XMLHTTP for ie and XMLHttpRequest for mozilla, on my local server which is win2000 server i've no problem with that but when i uploaded the file to the web server of our company which is redhat 9 i still have no problem with mozilla but the ie gives an error like this, System error: -1072896658
1
6571
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the server don´t response right. xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
4
17992
by: Arnaud | last post by:
Hi, I'm trying to translate an asp application, i have some difficulties with a particular line : --- Set myxml = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0") --- Classical ajax exemples rather use :
1
4917
by: Ike | last post by:
Ive copied an online example for writing out a php file, programmatically, then would like to re-display that data in a browswer window that automatically refreshes as the data file (getdata.php, which is the file I am programmatically rewriting to elsewhere) gets changed. I am trying to use AJAX and JSON to do this. I have copied an example of using HttpRequest Object as the backbone of this from...
6
10082
by: csinva | last post by:
I used some code from another post to successfully search and retrieve data from a web site. But now I have been pulling out my hair trying to take informaiton out of the file and display it in my form. Here is my code: Private Sub Command20_Click() Dim msXML As Object Dim strpageContent As String Dim fh As Long Dim strWebsite As String
0
1451
by: MLH | last post by:
http://www.alltel.com/text_messaging/ Above is the URL to which one would direct his browser to send text message to Alltel customer. I wrote a VBA script to automate text messaging field personnel with a construction company last year. All field reps carried Arch pagers. Arch.com is NOT affiliated with Alltel. Faced with a similar objective, how do I go about determining the URL I need to use with Alltel? I don't imagine its the same as...
2
4329
by: Skyblue | last post by:
I use Microsoft.XMLHTTP to access htm or asp pages on a central web site from other satellite sites. In this way, the same content can be displayed on a dozen websites and I only need to update one file in order to change the content displayed on all the websites. I have noticed that when I update the text in the file which is accessed by Microsoft.XMLHTTP (testXML.htm in the example below), the updates do not appear for some time on the...
14
14166
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
I've been searching everywhere online to find an alternative method besides using Microsoft.XMLHTTP (as it freezes the server up alot!!) but with no luck at all. I am using server side ASP, and some said to use Microsoft.ServerXMLHTTP instead. However I have tried that as well and it still freezes up the whole thing (i.e. the site just keeps loading forever). I tried to do a "on error resume next" clause to catch the error but still...
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.