Getting recognition results as XML
Contents
[
Hide
]
Aspose.OCR for Java can return recognition results as XML - a universal data exchange and storage format. To get the results as XML, use GetXml
method of RecognitionResult
object.
AsposeOCR api = new AsposeOCR();
// Add an image to OcrInput object
OcrInput input = new OcrInput(InputType.SingleImage);
input.Add("source.png");
// Recognize image
ArrayList<RecognitionResult> results = api.Recognize(input);
// Save result
System.out.println(results[0].GetXml());