How to parse xml to java object

  • 641 Views
  • Last Post 18 July 2016
Alisher posted this 16 July 2016

Hello, i want extract data from xml and save it to java object. I was tried by coordinates(left, top, right, bottom), but it's not reliably, because documnet scanned and not guarantees that documents scanned exactly like others(difference in coordinates large).

I marked text on the pdf document below, what i want get and save it to object.

I run TestApp from sample in sdk for java:

java TestApp recognize test.pdf result.xml --lang=russian

Sample document: test.pdf

https://www.dropbox.com/s/girz3it2ntt10fm/test.pdf?dl=0

After recognize: result.xml

https://www.dropbox.com/s/iofy6i4xjesrsyj/result.xml?dl=0

How i can achieve to do? Thanks!

Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 18 July 2016

Unfortunately, ABBYY hasn't got a ready code sample for such kind of conversion. But it seems the Java community has a solution for XML to Java Objects conversion. In the Internet you can find the following articles:

Alisher posted this 18 July 2016

а можно на русском?

Oksana Serdyuk posted this 18 July 2016

You can write us to CloudOCRSDK@abbyy.com in Russian.

Alisher posted this 18 July 2016

I think that you dont fully understand me, my question is how i can get information(for example: phone number of employee or email and etc) from generated xml by ocr sdk. I dont need full parsed infromation, just piece of information.I wrote to CloudOCRSDK@abbyy.com, i will wait for a response.Thanks!

p.s: I can't use JAXB because xml not structured.

Close