This blog post nicely describes how to generate Java classes with JAXB to read XML files, given a schema:
Using JAXB to Generate Java Objects from XML Document
In case you don’t have a schema you can also infer one. This online tool can do it for you:
A ridiculous amount of coffee was consumed in the process of building this project. Add some fuel if you'd like to keep me going!