spring-framework / org.springframework.oxm.castor

Package org.springframework.oxm.castor

Types

CastorMarshaller

open class CastorMarshaller : AbstractMarshaller, InitializingBean, BeanClassLoaderAware

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.

Exceptions

CastorMappingException

open class CastorMappingException : XmlMappingException

Exception thrown by CastorMarshaller whenever it encounters a mapping problem.