tags:

views:

23

answers:

1

Hello,

I am trying to programmatically set the org.exolab.castor.indent property when marshalling some objects - however, contrary to the documentation published, the class org.exolab.castor.util.LocalConfiguration does not seem to be shipped with the 1.3 release.

Currently, I have specified the castor.properties file on the classpath, which is picking up the properties I want to set, but I would rather reduce this deployment overhead, as my indentation requirement is not likely to change.

Any advice would be greatly appreciated.

A: 

This issue is solved here. As Werner Guttmann said:

Have a look at the setProperty(String, String) method on both the Marshaller and Unmarshaller classes. If you happen to be using the XMLContext class for creating Marshaller and Unmarshaller instances, there's corresponding methods.

John