views:

711

answers:

4

Where does the object "MSXML2.ServerXMLHTTP.4.0" come from? Which install package?

I'm attempting to do the following:

Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.4.0")

This attempt fails on my development machine (no object is returned) but it is successful on my collage's development machine. Obviously he has something installed that I don't or vice versa but where does this object, dll, etc come from?

What would I need to install to get this call to work.

For the record, changing the object to a different version isn't an option because code that this depends on was tested for several days against this specific version. We'd have to go back and test again...

To expand on this question, how can I tell which version of MS XML is currently installed?

A: 

I installed: MSXML 4.0 SP2 and it fixed my problem.

Though this only answers part of my question: Which version to install. I'd still like to know how to identify which version of MS XML is installed on one's system.

http://www.microsoft.com/downloads/details.aspx?familyid=3144b72b-b4f2-46da-b4b6-c5d7485f2b42&displaylang=en

Frank V
A: 

Try using this function:-

Function ProgIDInstalled(progID)
    On Error Resume Next
    Dim o : Set o = CreateObject(progID)
    ProgIDInstalled = Err.Number = 0
End Function

If ProgIDInstalled("MSXML2.DOMDocument.3.0") Then
    ' MSXML3 is present   '
End If

If ProgIDInstalled("MSXML2.DOMDocument.4.0") Then
    ' MSXML4 is present   '
End If

If ProgIDInstalled("MSXML2.DOMDocument.5.0") Then
    ' MSXML5 is present   '
End If

If ProgIDInstalled("MSXML2.DOMDocument.6.0") Then
    ' MSXML6 is present   '
End If

It surprises me that even now there are still new developments being made against the 4.0 version. Microsoft are now only patching version 3.0 and version 6.0 MSXML cores.

I know its too late now but really you should either be using 3.0 which has the advantage that is it ubiquitous on all Windows platforms currently in support so you don't really need to consider installing it at all. OR be using 6.0 since you need to include a distribution of MSXML it may as well be 6 since that is the latest and neither 4 nor 5 get any security patches.

AnthonyWJones
Hey there. Thank you for the code. I will give it a test in a bit. In response to the new development, it's not. We need to adapt legacy code, in a legacy system to work with SharePoint. We were using 3.0 and the developer assigned to figure out how to make this worked went to 4.0 and then tested everything w/o checking what the latest version was. I'd have preferred 6.0 but the research wasn't properly done. Not that we had the time...
Frank V
Seems to work, thank you.
Frank V
Anthony - Why is Microsoft patching only 3.0 and 6.0? What is special about 4.0 and 5.0 that they should be orphaned?
Cheeso
Two reasons. 3.0 is present on all systems currently in support. So if you are writing Script (ASP or Javascript on the client) that needs to use MSXML you will be using 3.0. Hence MS cannot ignore 3.0 although they'd like to. 4.0 and 5.0 OTH aren't used nearly as much and need to be installed by some app that wants to use them. Hence it can be reasoned that the effort needed to keep them up-to-date isn't worth it as major vendors using MSXML will surely now be using 6.0 which has been the current version for quite some time.
AnthonyWJones
A: 

They can all be installed at same time. Take a look under Windows/system32/msxml(ver).dll.

If you mean which version is registered, take a look here :

http://support.microsoft.com/kb/278674

of course, you can register/unregister same as any other dll.

A: 

Notice that MSXML 4.0 SP2 has meet its end of support. You should migrate to MSXML 6.0 to get the best support and enhancement, or fall back to MSXML 4.0 SP3 for legacy systems.

Samuel Zhang
Thanks -- I was aware of this. :-)
Frank V