Example of reading and writing a java class to XML