Community

How to parse xml to java object

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!

0

Comments

5 comments

  • Avatar
    Oksana Serdyuk

    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:

    0
    Comment actions Permalink
  • Avatar
    Alisher

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

    0
    Comment actions Permalink
  • Avatar
    Oksana Serdyuk

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

    0
    Comment actions Permalink
  • Avatar
    Alisher

    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.

    0
    Comment actions Permalink
  • Avatar
    joshi.pankaj112

    Hi Alisher,

    did you get solution for your problem?

    Regards,

    Pankaj

    0
    Comment actions Permalink

Please sign in to leave a comment.