|
This should be simple request – How can I programmatically
set Marshaller to indent the generated XML? I do not want to set my “customized” castor.properties
file on the classpath because of deployment concerns. I did see Keith Visco’s
reply to the same question on Fri Dec 07 2001, but obviously things have
changed since then. So what is the recommended approach now? Just for reference, here is the text of the original posting
and Keith’s reply. You
can use: Serializer
serializer = Configuration.getSerializer(); serializer.setOutputCharStream(writer);
OutputFormat
format = Configuration.getOutputFormat(); format.setIndent(true);
serializer.setOutputFormat(format);
Marhaller
marshaller = new Marshaller(serializer.asDocumentHandler()); --Keith
Youri
Canetti wrote: |
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
