ProcessXML - process an XML file
Syntax
.net: Integer Object.ProcessXML (inputFile, outputFile)
com: Object. ProcessXML (inputFile, outputFile, silent)
ocx: BOOL Object. ProcessXML (inputFile, outputFile, silent)
dll: BOOL mtProcessXML (hbarcode, inputFile, outputFile, silent)
Parameters
hBarcode Handle to an instance of the barcode toolkit (dll only).
inputFile Path to the xml file to be processed.
ouputFile Path to the xml or csv file to be created.
silent Integer or boolean value. 1/True will suppress error messages.
Return Value
1/True on success and 0/False on failure. For the COM object, use the XMLRetval property to obtain the return value for the function.
Remarks
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.
Win32 dll declarations:
VB.Net:
Private Declare Function mtProcessXML Lib “SoftekBarcode” (ByVal hBarcode As System.IntPtr, ByVal strInputFile As String, ByVal strOutputFile As String) As Short
Visual C++:
extern “C” {
int __stdcall mtProcessXML(HANDLE hBarcode, LPCSTR inputFilePath, LPCSTR outputFilePath, unsigned char silent) ;
}