Work with Barcode Recognition State in XML

Overview

In addition to barcode recognition functionality, class BarCodeReader allows performing the serialization of the barcode recognition state and uploading it in the XML format. The recognition state can be saved both to a file ExportToXml(String) or a stream ExportToXml(Stream). Moreover, it can be imported in the XML format from a file or a stream using functions ImportFromXml(String) and ImportFromXml(Stream).

It should be noted that the serialization of the information about a barcode image, the link to a source image file, or the image itself cannot be performed automatically. In the case of such a need, this functionality has to be set explicitly using the family of functions called SetBarCodeImage.

Save Barcode Recognition State to XML

Aspose.BarCode for C++ provides two ways to obtain the current state of class BarCodeReader: to an XML file through the ImportToXml(String) function or a stream using the ImportToXml(Stream) function.

Load Barcode Recognition State from XML

The current state of class BarCodeReader can be loaded from an XML file through the ImportFromXml(String) function or from a stream through the ImportFromXml(Stream) function. The target barcode image needs to be specified using the group of properties called SetBarCodeImage.

Load and Save Barcode Recognition State from Stream

Aspose.BarCode for C++ enables saving the barcode recognition state or loading it from streams using special functions ExportToXml(Stream) and ImportFromXml(Stream), respectively. The target barcode image needs to be set explicitly using the group of properties called SetBarCodeImage.