Hi Torsten,
We don't currently have a convenience method for this, but
you can get a handle on the Serializer and set the encoding yourself.
Take a look at
org.exolab.castor.util.Configuration#getSerializer
which returns an org.apache.xml.serialize.Serializer
-and-
org.exolab.castor.util.Configuration#getOutputFormat
which returns an org.apache.xml.serialize.OutputFormat
So you want something like:
OutputFormat format = Configuration.getOutputFormat();
format.setEncoding(...);
Serializer serializer = Configuration.getSerializer();
serializer.setOutputFormat(format);
serializer.setOutputCharStream(writer);
Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
--Keith
> Torsten Kruse wrote:
>
> Hi!
>
> I just tested your SoureGenerator and found it great - except one
> small point.
> Because we send german data (names, addresses, ...) we need a
> ISO-8859-1 (Latin1) encoding when writing to a XML file.
>
> Is it possible to force "someone" (Generator, Marshaller, ...) to do
> this?
>
> Thanks in advance.
>
> Torsten Kruse
>
> --------------------------------------------
> COMINTO GmbH
> Klosterstra�e 49
> 40211 D�sseldorf
> www.cominto.de
>
> eMail: [EMAIL PROTECTED]
> Tel: 0211 / 60 00 16 - 88
> Fax: 0211 / 60 00 16 - 89
> Mobil: 0179 / 21 64 67 7
> --------------------------------------------
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev