If you're sure that version 4 is installed then use your first function with the following change:
Code:
function ProcessXML1() {
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load(XMLID.XMLDocument);
/* OR
xmlDoc.loadXML(XMLID.XMLDocument.xml);
*/
if (xmlDoc.parseError.errorCode != 0) {
var myErr = xmlDoc.parseError
alert("You have error " + myErr.reason);
}
otherwise use the following prog id "Msxml2.DOMDocument.3.0".
and use:
Code:
xmlDoc.setProperty("SelectionLanguage", "XPath");
as your next line
Never use "Microsoft.XmlDom" unless you need to support version 1 and 2 machines.
The inequality operator in JavaScript is !=.
--
Joe