Use the Marshaller object, eg :
StringWriter writer = new StringWriter();
org.exolab.castor.xml.Marshaller marshaller = new
org.exolab.castor.xml.Marshaller(writer);
marshaller.setMarshalAsDocument(false);
marshaller.marshal(myCastorObject);
----- Original Message -----
From: "Farrukh Najmi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 4:51 PM
Subject: [castor-dev] Avoiding XML declrataion at top of marshal output
>
> I am marshaling a Castor object to be enclosed within a SOAP message.
> The marshal method outputs the XML declaration like:
>
> <?xml version="1.0"?>
>
> at the top of the output. Is there a way to tell Castor to not do that
> since when it is in the middle if a SOAP message it causes errors in
> parsers.
>
> Alternatively does anyone have code they can share that strips the XML
> declaration out? Thanks.
>
>
> --
> Regards,
> Farrukh
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev