I wonder if you can help me with the Scripting in Enfocus Switch.
I'm desperatly trying to change a value in an xml file.
there might be many different solutions in the switch universe to achieve something comparable. But in my case the xml and loaded metadata from the xml come into the script anyway. (downloading attached PDF assets)
what i want to do is to check if value has a certain value and if true change that value.
XML Path is for example
order->shipment->shipTo->carrier
if value is "dhl .+ national" i want to change it to "ups"
I found how to open the actual xml file
Code: Select all
var xmlPath = job.getPath();
var doc = new Document(xmlPath);
Code: Select all
doc.save(xmlPath);
job.sendToData(1, xmlPath, job.getName());
Code: Select all
var root = doc.getDocumentElement();
what would it look like to read the text value of one node and how to change a text value.
many thanks in advance
Matthias