14

I am starting getting to grips with XML through VB6. I frequently find the advice to reference version 2.6 of Microsoft XML. However, on my development computer I get a wealth of choices ranging from version 2 (msxml2.dll) to version 6 (msxml6.dll)

Which one to choose?

Dabblernl
  • 15,831
  • 18
  • 96
  • 148
  • Is there any reason why you're using VB6 for this? You might find VB.NET (or C#, if you're comfortable with the syntax) more intuitive when it comes to dealing with XML. – Richard Ev Jul 15 '10 at 11:01
  • 5
    Well of course I would love to use .Net. The main program is written in VB6 however and a migration is still some time away. – Dabblernl Jul 15 '10 at 11:06
  • 2
    How about writing your XML code in a .NET assembly. and creating a COM interop assembly so that it can be called from VB6? This might be an OK approach if you can reasonably expose an interface that allows interaction with your business objects (or whatever else you have stored in XML) – Richard Ev Jul 15 '10 at 11:45
  • 3
    @Richard Ev Good idea, certainly worth consideration. Although COM interop has its own pitfalls, so I don't think it's an automatic winner. It might depend how familiar Dabblernl is with .Net and particularly COM interop. – MarkJ Jul 15 '10 at 12:22

2 Answers2

4

MSXML3 shipped with Internet Explorer 6, and is a pretty safe bet for being installed on all versions of windows today. If you are going to use a later version, you are going to have to ship the installer for it along with it. BTW nonnb is wrong and the supported version of MSXML4 SP3 is (see download details: ),

MSXML 4.0 SP3 is supported on the following operating systems:

  • Windows 2000

  • Windows Server 2003

  • Windows XP

  • Windows Vista

  • Windows Server 2008

    and if you are going to go with an installer and not support Win95/98, you might as well go with MSXML6, use the latest code and use the MSI provided.

Community
  • 1
  • 1
Kris Erickson
  • 33,454
  • 26
  • 120
  • 175
4

I usually go with the XML Team's recommendations:

Using the right version of MSXML in Internet Explorer

I doubt this advice is limited to IE.

Summary: Use 6.0 if possible, 3.0 as a fallback.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Bob77
  • 13,167
  • 1
  • 29
  • 37