Getting recognition results as XML

Contents
[ ]

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

# Instantiate Aspose.OCR API
api = AsposeOcr()
# Add image to the recognition batch
input = OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Recognize the image
results = api.recognize(input)
# Show JSON
json = results[0].get_xml()
print(json)