I need to programatically configure the OutputFormat that is being generated after it gets created but before the marshaling starts. How can I do this?
Basically, I need to call setLineWidth(0) to get rid of the indentation inside existing string nodes. I am ready to do '-nomarshal' on the source generation options and create my own marshallers, but I still can't see a way of getting this done.
Even when instantiating a marshaller, the serializer is private and has no setter, same as the outputformat.
Looking at the source the only places I see I can override are where the _format member gets created, which includes:
setDocType
setMarshalAsDocument
setEncoding
I guess I can override these, call super and then do my configuration, haven't tried yet. But I'd like to know what the "right" way of doing this is. overriding getDocType does not guarantee the outputFormat won't get initialized elsewhere in the future and give very weird behavior.
Calling getOutputFormat() on the LocalConfiguration always returns a new outputformat, so it can't be configured through there. You can't inherit from the final class LocalConfiguration because it is final (and it wouldn't make any difference since it's a singleton that gets called directly.
So how can I do this other than recompiling castor with my own change and face regression problems later?
Thanks,
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
