ProcessXML

Overview

int STProcessXML (void *hBarcode, char *inputFilePath, char *outputFilePath, int silent) 

hBarcode is a handle to a barcode session.
inputFilePath is the path to the XML file containing settings and process instructions.
outputFilePath is the path to the output CXV or XML file that will receive the results.  
silent
controls whether the function writes to standard output or displays a message box (win32). 

ProcessXML takes property values, file names and folder names from the inputFile and creates outputFile in either XML or CSV file format.

The property values defined in the XML file follow the specification as defined in the manual page for LoadXMLSettings. The files and folder to process are defined in the following way....

To process a file:

<Process>
   <File>/path/to/image.tif</File>
</Process>

To process the images in a folder:

<Process>
   <Folder>/path/to/folder</Folder>
</Process>

Both the File and Folder tags accept an optional id attribute. This can be used in the output to identify the image file or folder.

Example:

<xml>
   <SoftekBarcode>
      <Properties>
      </Properties>
      <Properties>
         <MedianFilter>1</MedianFilter>
      </Properties>
      <Process>
         <File id=1001>C:\tmp\image1.tif</File>
         <File id=1002>C:\tmp\image2.tif</File>
         <File id=1003>C:\tmp\image3.tif</File>
         <Folder id=9001>C:\tmp\images</Folder>
      </Process>
   </SoftekBarcode>
</xml>

See the manual page for SaveResults for the output file format.

Return Value

1 on success and 0 on failure.