Try using a java.io.StringWriter:

StringWriter sw = new StringWriter();
bean.marshal(sw);
String str = sw.toString();

-----Original Message-----
From: Melanie Tanaka [mailto:melanie_tanaka01@;yahoo.com]
Sent: Wednesday, October 23, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Stupid Question - Castor XML


Hi Guys (and Ladies),
I have stupid question for you please...
I want to Marshal my bean to String. The only two
options that I see  are Writer and ContentHandler. Do
these work for me to marshal to String? I want to do
something like this:
String myString = bean.marhsal(??) ;
or String myString Marshaller.marshal(bean);

Sorry for stupid questions but thanks to you for your
help!!

Bye, 
Melanie (Miho) Tanaka

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

----------------------------------------------------------- 
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

Reply via email to