CastorMarshaller()Implementation of the Marshaller interface for Castor. By default, Castor does not require any further configuration, though setting target classes, target packages or providing a mapping file can be used to have more control over the behavior of Castor.
If a target class is specified using setTargetClass, the CastorMarshaller can only be used to unmarshal XML that represents that specific class. If you want to unmarshal multiple classes, you have to provide a mapping file using setMappingLocations.
Due to limitations of Castor's API, it is required to set the encoding used for writing to output streams. It defaults to UTF-8.
Author
Arjen Poutsma
Author
Jakub Narloch
Author
Juergen Hoeller
Since
3.0
See Also
#setEncoding(String)#setTargetClass(Class)#setTargetPackages(String[])#setMappingLocation(Resource)#setMappingLocations(Resource[])