spring-framework / org.springframework.oxm.castor / CastorMarshaller / <init>

<init>

CastorMarshaller()
Deprecated: as of Spring Framework 4.3.13, due to the lack of activity on the Castor project

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[])