Yep, the namespace is what's tripping you here: it is defined as a default namespace (i.e. no-prefix) which XPATH cannot handle natively.

In addition, whenever you do manage to retrieve a node, you must use node.text to get its content.

So to bypass the namespace issue, you have to specify that you are specifically looking for a node using its local name as opposed to its namespace name.

The following code should work:
Code:
var myXML = new ActiveXObject('Msxml2.DOMDocument.6.0');
myXML.load(Watch.GetJobFilename());
var valueNode1 = myXML.selectSingleNode("//*[local-name()='orderNo']");
Watch.Log(valueNode1.text,2);

Note that to make it even more explicit, you could also use:
Code:
var valueNode1 = myXML.selectSingleNode("./*[local-name()='order']/*[local-name()='orderNo']");


More information about default namespaces and XPATH is available on this Microsoft page: https://docs.microsoft.com/en-us/dotnet/standard/data/xml/xpath-queries-and-namespaces



Edited by Philippe F. (04/04/19 08:13 PM)
Edit Reason: Additional Info
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen