I want to format a XML document during unmarshal with JAXB.
Unmarshal looks like:
Unmarshaller u = createAndsetUpUnmarshaller(enableValidation, evtHandler, clazz);
return u.unmarshal(new ByteArrayInputStream(stringSource.getBytes()));
While marshaling one can format the code via:
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
But this isn“t possible ...