Refactoring JAXB parsing