Reputation: 1
Is there a way or a function in java where java can create several xml documents for each customer that i am queering from a sql db?
PreparedStatement statement = connection.prepareStatement("SELECT (sqlstuff), (sqlstuff) , (sqlstuff) , (sqlstuff) , (sqlstuff) ,(sqlstuff) , (sqlstuff) , " + "(sqlstuff) , (sqlstuff) , (sqlstuff) , (sqlstuff) , (sqlstuff) , (sqlstuff) , (sqlstuff) , (sqlstuff#), (sqlstuff#) OST00008 FROM filetype");
ResultSet resultSet = statement.executeQuery();
Upvotes: 0
Views: 234
Reputation: 10312
The easiest thing I've found was to use an ORM tool like Hibernate to map the objects into a database for me, and then use JAXB as well. I'd put the Hibernate annotations on the object's fields, and the XML annotations on the object's property getters, and I had to write almost no serialization code for either, only what was required to integrate with the two frameworks.
Upvotes: 0
Reputation: 4273
I suggest you this clean way:
Upvotes: 2