Nuser60429
Nuser60429

Reputation: 23

What is a modern way to persist an XML object into a database?

My workplace gave me the task to map out the frameworks and libraries that we will use in an upcoming project. I'm not well versed in some of the areas and one of them is the following:

We are calling a 3rd party API that returns an XML that is several thousand lines long, each XML contains the data related to a single person.

We need to map each person's data to our database. Our previous architect suggested we use Hibernate to parse the XMLs into data transfer objects.

Is hibernate the way to go or is there a simpler/more efficient or more modern way of achieving this?

The system calling the 3rd party API is built with Java, JAX-RS. We have oracle databases.

Upvotes: 0

Views: 163

Answers (1)

Dan Whitehouse
Dan Whitehouse

Reputation: 578

I'd agree, this is really off-topic for the site, however, I'd suggest using FasterXML/Jackson. The library allows you to convert the XML into java objects. Once they are in object form, you can go ahead and do something with hibernate.

Take a look here: https://github.com/FasterXML/jackson

Upvotes: 1

Related Questions