How to parse xml to java object

  • Last Post 06 January 2020
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

After recognize: result.xml

How i can achieve to do? Thanks!

Order By: Standard | Newest | Votes
Oksana S. 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 S. posted this 18 July 2016

You can write us to 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, i will wait for a response.Thanks!

p.s: I can't use JAXB because xml not structured. posted this 06 January 2020

Hi Alisher,

did you get solution for your problem?