Getting recognition results as XML

Contents
[ ]

Aspose.OCR for .NET can return recognition results as XML - a universal data exchange and storage format. To get the results as XML, use GetXml method of Aspose.OCR.RecognitionResult object.

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add an image to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source.png");
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input);
// Show XML
string xml = results[0].GetXml();
Console.WriteLine(xml);