Forum Academy Marketplace Showcase Pricing Features

Extract XML file from a URL - Convert XML to JSON - Display data in Bubble group element

Hello Bubblers,

I’m trying to integrate ABBY CLOUD OCR to recognize details in business cards using processBusinessCard Method POST API call for a while. I have successfully implemented the API. But the issue is I’m not able to get a output in JSON that is readable in bubble, since the API endpoint returns a URL that includes a XML file with the extracted data from the business card image.

API endpoint result response is like following,

{
“taskId”: “3ba9c1bc-5ac6-4d39-b713-91aa3ec7723e”,
“registrationTime”: “2021-09-16T07:25:30Z”,
“statusChangeTime”: “2021-09-16T07:25:32Z”,
“status”: “Completed”,
“filesCount”: 1,
“requestStatusDelay”: “”,
“resultUrls”: “https://ocrsdkwestus.blob.core.windows.net/files/7725f68c-194e-4f88-9393-a2def66a4234.result?sv=2012-02-12&se=2021-09-16T17%3A00%3A00Z&sr=b&si=downloadResults&sig=KG%2BN7mJlOWiAlPSFTmNRexZFRu4UlO1qPiFtpv509OU%3D
}

resultUrls” parameter returns a URL that includes a XML file with extracted business card details as follows, ( you can find this xml file when you access "“resultUrls” parameter value in the API result response using a web browser)

< document xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns=“http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd” xsi:schemaLocation=“http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd”>
< businessCard imageRotation=“noRotation”>
< field type=“Phone”>
< value>+123-456-7890
< /field>
< field type=“Email”>
< value>[email protected]
< /field>
< field type=“Name”>
< value>Dan Porter
< /field>
< field type=“Company”>
< value>TTBINC.
<!/field>
< field type=“Company”>
< value>ttb
< /field>
< field type=“Job”>
< value>Sales Manager
< /field>
< field type=“Text”>
< value>
TTBINC. Dan Porter Sales Manager [email protected] +123-456-7890
< /value>
< /field>
< /businessCard>
< /document>

I’m pretty lost with extracting relevant data (Name, Email, Company, Phone etc) using the result URL file as JSON and displaying extracted data inside a bubble group element. Does anyone know how to do this or guide me to the correct path? Your help would be highly appreciated. Looking forward for any support.

Thank you.
Ravi

Hi buddy,

So I recently found out about Microsoft Excel’s Power Query. Here is a link. Hope this helps you.
It basically is a webscraper that can convert any data into an excel sheet, i do know you can then convert an cvs file to json.

Power Query

Thank you @jasoncruz.dev . I will look into this for sure. This will be a great start. Thanks again.

1 Like