public static < T > void marshal ( T obj , File f ) throws JAXBException { JAXBContext ctx = JAXBContext . newInstance ( obj . getClass ( ) ) ; Marshaller m = ctx . createMarshaller ( ) ; m . marshal ( obj , f ) ; }
Convert an object to a string and save it to a File .