improved jaxb parsing
(cherry picked from commit b791701)