I hope this example will help.
In this case the XML has three jobs, each made of a PDF file. In addition to the file, number of copies for each job is set in the Copies tag. So the incoming XML looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>
To get this to work, first you need to create a XSL file mapping the values to columns. The xsl will create a CSV file out of the xml. The XSL would look like:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
This XSL, is looking in the parent tag Jobs, for tags called Job. Each Job tag, gets it's own line in the CSV (
). Then in the line the value from the Field tag is placed, after which a comma is placed. After this the number of copies is placed, and again another comma.
Save this XSL file to a folder e.g. "C:\Xerox\FreeFlow\Core\Data\XSL\st_test.xsl"
The second item required to do the conversion is the script. This is placed in the FreeFlow Core installation directory and called TransformXML.bat.
Setup your Scripting settings in the Connection setup as shown in the screenshot attached.
Note, use the full path to the TransformXML.bat and also note that you have to give the name of the output csv in the parameters as "$FFout$\out.csv"
The third part is in the MAX configuration, setup the File Name to be column A and Quantity to be column B.
If you now place the xml into the hot folder, the first thing that happens, you get a stdout.log file added to a MAX Status folder. It should look something like:
<stdout 21/08/2017 09:55:31>
At this time you get a file out.csv saved into ScriptOutput folder. At this point the MAX picks up the out.csv and processes it.
You will get the final MAX Status inside ScriptOutput\Max Status and it should be called out.status.csv and in this case three jobs should appear in Job Manager (in case you have the files test1.pdf-test3.pdf in your temp folder).