Castor - Java-Springs

Castor XML mapping is an open source XML binding framework. It allows you to transform the data contained in a java object model into/from an XML document. By default, it does not require any further configuration, though a mapping file can be used to have more control over the behavior of Castor.

Castor Marshaller

As with JAXB, the Castor Marshaller implements both the Marshaller and Un marshaller interface.It can be wired up as follows:

<bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller" />


Although it is possible to rely on Castor's default marshalling behavior, it might be necessary to have more control over it. This can be accomplished using a Castor mapping file.

The mapping can be set using the mapping Location resource property, indicated below with a classpath resource.

<bean id="castorMarshaller" class="org.spring frame work.oxm.castor.Castor Marshaller" >
<property name="mappingLocation"value="classpath:mapping.xml"/>

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Java-Springs Topics