> From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 5:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] toString() methods
> 
> 
> This one time, at band camp, Keith Visco said:
> 
> KV>Perhaps, an optional configuration to generate a 
> toXMLString() method.
> KV>
> KV>I personally don't think the toString() method should be 
> overwritten to
> KV>produce XML, but a toXMLString method is a possibility.
> 
> I think that Keith's suggestion makes much more sense - toXMLString
> instead of toXML(). This only accentuates the point I was 
> making below:
> 
> <quote>
> At any rate, in applications I've built in the past where I 
> wasn't using
> Castor, I implemented both toString() and toXml() methods.
> </quote>

You lost me at a single blow. Do you mean to distinguish from toXmlCharArray()? Let's 
make the option Keith mentioned earlier a function-name
in org/exolab/castor/builder/castorbuilder.properties:
org.exolab.castor.builder.stringName = toBla

> 
> Bruce

Anyway, I can get my hands on a string representation of the object, I'm just asking 
for less code in my program.

Here it is:

String xmlString(){
  StringWriter w = new StringWriter();
  this.marshal(w);// maybe the more generic way instatiate a marshaller:-{
  return w.toString;
}

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to