A quick run down on what this does:
Set xmlDoc = CreateObject("MSXML2.DomDocument." & sVer)
This line instantiates a specific version of Microsoft's implementation of W3C's DOM standard. You shouldn't have to specify version - you should just have to do:
Set xmlDoc = CreateObject("MSXML2.DomDocument")
Or even better, add a reference to the latest "Microsoft XML n.n" library and do:
Dim xmlDoc As MsXml2.DomDocument
Set xmlDoc = New MsXml2.DomDocument
The reason why there are so many versions is because there are several, slightly incompatible versions of the same library. And different installed applications may each use a different version.
As for:
xmlDoc.setProperty "NewParser", True
This is an example of Microsoft's non-standard extensions to DOM. To support various Microsoft-specific behaviours, they have added the concept of "secondary properties", which have no basis in the official W3C DOM standard. In this specific case, it is setting the "NewParser" property to True (see http://msdn.microsoft.com/en-gb/library/windows/desktop/ms767616%28v=vs.85%29.aspx). This means nothing in any version other than MSXML6.DLL.
There is no direct Java version, but this example allows you to create DOM object based on a string:
How do I load an org.w3c.dom.Document from XML in a string?
In this example, the setProperty() call does not exist.
The .NET equivalent (in C#) is:
using System.xml
function doIt()
{
XmlDocument doc = new XmlDocument();
}
SetProperty() doesn't exist in XmlDocument either.