First page Back Continue Last page Graphic
(Un)marshalling
// Create new CompanyInfo
Project info = new Project("Castor");
// Marshal as XML
File xmlFile = new File("test.xml");
Marshaller.marshal( info,
new FileWriter( xmlFile ) );
// Unmarshal from XML
info = (Project) Unmarshaller.unmarshal(
Project.class,
new FileReader( xmlFile ) );