{"id":1349,"date":"2009-10-26T11:09:50","date_gmt":"2009-10-26T11:09:50","guid":{"rendered":"http:\/\/www.bardecode.com\/newsite\/?p=1349"},"modified":"2013-02-12T11:11:11","modified_gmt":"2013-02-12T11:11:11","slug":"saveresults-save-the-results-to-an-xml-file","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/newsite\/saveresults-save-the-results-to-an-xml-file\/","title":{"rendered":"SaveResults &#8211; save the results to an XML file"},"content":{"rendered":"<p><strong><strong>Overview<\/strong><strong><\/strong><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>.net\/ocx:\u00a0Object.<strong>SaveResults<\/strong>\u00a0(file)<br \/>\ncom:\u00a0Object.\u00a0<strong>SaveXMLResults<\/strong>\u00a0(file)<br \/>\ndll:\u00a0<strong>mtSaveResults<\/strong>\u00a0(hbarcode, file)<\/strong><\/p>\n<p><strong><strong>Parameters<\/strong><\/strong><\/p>\n<p><strong>hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only).<br \/>\nfile\u00a0Path to the xml or csv file to be created.<\/strong><\/p>\n<p><strong><strong>Return Value<\/strong><\/strong><\/p>\n<p><strong>1\/True on success and 0\/False on failure.<\/strong><\/p>\n<p><strong><strong>Remarks<\/strong><\/strong><\/p>\n<p><strong>SaveResults saves the current set of results to an XML or CSV file.<\/strong><\/p>\n<p><strong>The outputFile format is determined by the file extension (csv or xml).<\/strong><\/p>\n<p><strong>The CSV fields are as follows:<\/strong><\/p>\n<p><strong>Folder &#8211; location of image file<br \/>\nFile Name<br \/>\nCount &#8211; number of barcodes found in image<br \/>\nIndex &#8211; Index for this bar code (1,2,3 etc or -1 is no barcode found).<br \/>\nError &#8211; Error number<br \/>\nID &#8211; as specified in an xml input file for image or folder (see\u00a0ProcessXML\u00a0)<br \/>\nValue &#8211; value of barcode<br \/>\nType &#8211; type of barcode<br \/>\nHits &#8211; hit count for this barcode<br \/>\nPage &#8211; page number in image<br \/>\nDirection &#8211; ScanDirection mask value for this barcode<br \/>\nTopLeftX &#8211; x position for top left<br \/>\nTopLeftY &#8211; y position for top left<br \/>\nBottomRightX &#8211; x position for bottom right<br \/>\nBottomRightY &#8211; y position for bottom right<\/strong><\/p>\n<p><strong>The XML output format contains the same information as the CSV format, but arranged in the following way:<\/strong><\/p>\n<p><strong>&lt;xml version=&#8217;1.0&#8242; encoding=&#8217;iso-8859-1&#8242;&gt;<br \/>\n&lt;SoftekBarcode&gt;<br \/>\n&lt;Result&gt;<br \/>\n&lt;Folder&gt;<em>location of image file<\/em>&lt;\/Folder&gt;<br \/>\n&lt;FileName&gt;<em>name of file<\/em>&lt;\/FileName&gt;<br \/>\n&lt;Count&gt;<em>number of barcodes<\/em>&lt;\/Count&gt;<br \/>\n&lt;Error&gt;<em>error number<\/em>&lt;\/Error&gt;<br \/>\n&lt;ID&gt;<em>id as specified in an xml input file for image or folder (see\u00a0<\/em><em>ProcessXML<\/em><em>)<\/em>&lt;\/ID&gt;<br \/>\n<em>Repeated for each barcode found in image<\/em><br \/>\n&lt;Barcode&gt;<br \/>\n&lt;Value&gt;<em>value of barcode<\/em>&lt;\/Value&gt;<br \/>\n&lt;Type&gt;<em>type of barcode<\/em>&lt;\/Type&gt;<br \/>\n&lt;Hits&gt;<em>score<\/em>&lt;\/Hits&gt;<br \/>\n&lt;Page&gt;<em>page number<\/em>&lt;\/Page&gt;<br \/>\n&lt;Direction&gt;<em>ScanDirection mask value for this barcode<\/em>&lt;\/Direction&gt;<br \/>\n&lt;TopLeftX&gt;<em>x position for top left<\/em>&lt;\/TopLeftX&gt;<br \/>\n&lt;TopLeftY&gt;<em>y position for top left<\/em>&lt;\/TopLeftY&gt;<br \/>\n&lt;BottomRightX&gt;<em>x position for bottom right<\/em>&lt;\/BottomRightX&gt;<br \/>\n&lt;BottomRightY&gt;<em>y position for bottom right<\/em>&lt;\/BottomRightY&gt;<br \/>\n&lt;\/Barcode&gt;<br \/>\n&lt;\/Result&gt;<br \/>\n&lt;\/SoftekBarcode&gt;<br \/>\n&lt;\/xml&gt;<\/strong><\/p>\n<p><strong><strong>Win32 dll declarations:<\/strong><\/strong><\/p>\n<p><strong><strong>VB.Net:<\/strong><\/strong><\/p>\n<p><strong>Private Declare Function mtSaveResults Lib &#8220;SoftekBarcode&#8221; (ByVal hBarcode As System.IntPtr, ByVal strOutputFile As String) As Short<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong><strong>Visual C++:<\/strong><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>extern &#8220;C&#8221; {<br \/>\nint __stdcall mtSaveResults(HANDLE hBarcode, LPCSTR filePath);<\/strong><\/p>\n<p><strong>}<\/strong><\/p>\n<div><strong><br \/>\n<\/strong><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview &nbsp; .net\/ocx:\u00a0Object.SaveResults\u00a0(file) com:\u00a0Object.\u00a0SaveXMLResults\u00a0(file) dll:\u00a0mtSaveResults\u00a0(hbarcode, file) Parameters hBarcode\u00a0Handle to an instance of the barcode toolkit (dll only). file\u00a0Path to the xml or csv file to be created. Return Value 1\/True on success and 0\/False on failure. Remarks SaveResults saves the current set of results to an XML or CSV file. The outputFile format is determined &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[236,18],"tags":[],"class_list":["post-1349","post","type-post","status-publish","format-standard","hentry","category-documentation-for-our-toolkits-and-applications","category-knowledge-base"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1349"}],"collection":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/comments?post=1349"}],"version-history":[{"count":1,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1349\/revisions"}],"predecessor-version":[{"id":1351,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/posts\/1349\/revisions\/1351"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/media?parent=1349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/categories?post=1349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/newsite\/wp-json\/wp\/v2\/tags?post=1349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}