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 JSON, use GetXml
method of RecognitionResult
object.
AsposeOCR api = new AsposeOCR();
// Customize recognition
RecognitionSettings recognitionSettings = new RecognitionSettings();
recognitionSettings.setLanguage(Language.Ukr);
// Extract text from image
RecognitionResult result = api.RecognizePage("source.png", recognitionSettings);
// Get recognition results as JSON
String resultXML = result.GetXml();