The framework consists of two main classes, org.exolab.castor.xml.Marshaller and org.exolab.castor.xml.Unmarshaller .
Lets walk through a very simple example.
This won't work because the mapping will be ignored. The above example uses the static methods of the marshalling framework. When descriptors are not available for a specfic Class, the marshalling framework uses reflection to gain information about the object. Actually an in memory set of descriptors are created for the object and we will soon have a way for saving these descriptors as Java source, so that they may be modified and compiled with little effort. If a set of descriptors exist for the classes, then Castor will use those to gain information about how to handle the marshalling.