Created
June 13, 2016 14:07
-
-
Save anildigital/9b217c76c2ece2695fbc0e7f5831dfef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void convertToXml(AnyObject object) | |
throws JAXBException, FileNotFoundException | |
{ | |
JAXBContext contextObj = JAXBContext.newInstance( PnrRetrieveResult.class); | |
Marshaller marshallerObj = contextObj.createMarshaller(); | |
marshallerObj.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); | |
marshallerObj.marshal(object, new FileOutputStream( "/tmp/result.xml")); | |
System.out.println("Done "); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment