- Use trang to create a xml schema for the xml files
- Use xjc to create the java objects
- Use jpa with xml mapping to persist so there's no need to touch the generated source form xjc. For fields you don't care about map them as transient.. e.g.
<entity class="com.domain.xml_1_0.Site" access="FIELD">
<attributes>
<transient name="siteInternalId"/>
<transient name="siteLinkage"/>
<id name="siteId"/>
</attributes>
</entity>