I'm not able to extract the simplest of values from the xml and I'm wondering if it's because I need to address (and how to address) the namespace that's defined in the xml. Actually - xmlget grabs this value for me just fine. I've stepped back from the the name:value pair problem of yesterday and now I'm just trying to return any value from the xml via the javascript solution you suggested yesterday.
The xml begins with:
<?xml version="1.0" encoding="UTF-8"?>
<order xmlns="http://www.sfly.com/orderv3/order">
<version>3.0</version>
<orderNo>PRMR-SS-201903-84705</orderNo>
<orderDate>2019-03-26 12:16:40 PDT</orderDate>
Working backwards from the code you provided yesterday, I've simplified it just to try and nail down where I'm going wrong. In the code below I've tried calling orderNo in a variety of ways, and I keep getting nothing back. ./order/orderNo, /order/orderNo, order/orderNo, ./orderNo, /orderNo - and probably a couple more variations. In the log I'm getting:
ERROR: W3602 : Error 0 on line 4, column 1: Microsoft JScript runtime error: Type mismatch
ERROR: W3603 : Error running script.
ERROR: Run Script: W1603 : Plugin failed - 11:26:31 (elapsed time: 00:00:00:078)
If I hard code a value in for var valueNode1 = "testvalue";, that gets returned to me correctly, so it seems to be how I'm specifying myXML.selectSingleNode("orderNo"); that's the problem.
var myXML = new ActiveXObject('Msxml2.DOMDocument.6.0');
myXML.load(Watch.GetJobFilename());
var valueNode1 = myXML.selectSingleNode("orderNo");
Watch.SetVariable("global.sfly_packageName", valueNode1);
Any suggestions on where I'm going wrong with this?
Thanks,
Jim