I have an old Access database that is basically one flat file. I want to migrate the data to my new whizzy, object oriented, hibernate based wonder-app.
The data is available as an XML file, and I want to map to three separate java pojos. I planned on using JAXB to do this, specifically using @xmlelement annotation. However the structure of the XML file is not optimal, in my pojos I have split up the data into three different objects.
Will JAXB help with this ? Do I need to simply create java pojo based on existing schema/xml file (that is not oo) using jaxb. Then create apdater classes/layer to put the data into my three pojos ? Or can I map straight from the xml file to 3 pojos with correct config/annotation ?
Without knowing the specifics of your issues…it should be possible, but it sounds like this may be a case where you would want to write a schema, use xjc to generate binding objects, unmarshal to the generated binding objects, and then translate to your domain objects in java (or use the generated objects directly if applicable).