public static void objectToXML ( Object object , String fileName ) throws FileNotFoundException { FileOutputStream fo = new FileOutputStream ( fileName ) ; XMLEncoder encoder = new XMLEncoder ( fo ) ; encoder . writeObject ( object ) ; encoder . close ( ) ; }
Converts an object to an XML file .