N
Norman Chong
Hi,
I want to get my MSXML version from a vb.net program. I do it with the
following piece of code, but I'm not very happy with that:
Dim Version as String = "4.0"
oXML = CreateObject("Msxml2.DOMDocument.4.0") 'Need version 4.
If oXML Is Nothing Then 'Check the existing version
oXML = CreateObject("MSXML2.DOMDocument.3.0")
Version = "3.0"
If oXML Is Nothing Then
oXML = CreateObject("MSXML2.DOMDocument.2.6")
Version = "2.6"
If oXML Is Nothing Then
oXML = CreateObject("MSXML2.DOMDocument")
Version = "2.0"
If oXML Is Nothing Then
Version = "Not detected"
End If
End If
End If
End If
Does anybody know a more elegant way to do this?
Thanks,
Norman
I want to get my MSXML version from a vb.net program. I do it with the
following piece of code, but I'm not very happy with that:
Dim Version as String = "4.0"
oXML = CreateObject("Msxml2.DOMDocument.4.0") 'Need version 4.
If oXML Is Nothing Then 'Check the existing version
oXML = CreateObject("MSXML2.DOMDocument.3.0")
Version = "3.0"
If oXML Is Nothing Then
oXML = CreateObject("MSXML2.DOMDocument.2.6")
Version = "2.6"
If oXML Is Nothing Then
oXML = CreateObject("MSXML2.DOMDocument")
Version = "2.0"
If oXML Is Nothing Then
Version = "Not detected"
End If
End If
End If
End If
Does anybody know a more elegant way to do this?
Thanks,
Norman