changed xml parsing from dtd to jaxb
program exits if validation fails, commented code out. needs tidying up.