JAXBContext context = JAXBContext
.newInstance(CreateExemptionCertificate.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
m.marshal(cc, System.out);
In the code above i am getting the result to the console (I mean XML is getting printed on the console). I want to get this XML to a string. I am not getting which argument I should pass to the marshal method to get XML String in a String variable instead of printing it on the console. Anybody having any idea please share.