Code: Select all
var IssueType = job.getVariable()[Path="/JobSheet/IssueJobSheet/IssueInfo/@IssueType",Dataset="Xml",Model="XML"];
s.log(2, "Issue Type = " + IssueType);
I then want to write the ISSUE_TYPE element into the XML file if the IssueType = Supplement. If not, I don't want to write the element at all.
Code: Select all
if((IssueType) == "Supplement"){
var iwNode = theDoc.createElement("ISSUE_TYPE");
var iwTextNode = theDoc.createText(IssueType);
iwNode.appendChild(iwTextNode);
theRootNode.appendChild(iwNode);}
When a job hits this element,I get the following error: "Error in line 11 of script: TypeError. 'getVariable' undefined or not a function.