toXML() or xmlString() I'd say, but I like it.
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 11:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] toString() methods
>
>
>
> Perhaps, an optional configuration to generate a toXMLString() method.
>
> I personally don't think the toString() method should be
> overwritten to
> produce XML, but a toXMLString method is a possibility.
>
> --K
>
> [EMAIL PROTECTED] wrote:
> >
> > H Bruce,
> >
> > So I need to,
> >
> > String b;
> > StringWriter w = new StringWriter();
> > obj.marshal(w);
> > some.where.println(w.toString());
> >
> > and I'll get the <?xml?>, unless i use an extra marshaller
> for my logging purposes.
> >
> > Or am i missing your point completely? I think see your
> point, but I am looking for some 'syntactic sugar' here, like
> obj.toString() giving the xml representation of the thing.
> Which is good for a data object isn't it?
> >
> > > -----Original Message-----
> > > From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, September 25, 2002 6:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [castor-dev] toString() methods
> > >
> > >
> > > This one time, at band camp, [EMAIL PROTECTED] said:
> > >
> > > >Does it make sense to have objects have a toString method
> > > that returns
> > > > the xml representation of this object. Without the <?xml?>.
> > > I've been
> > > > longing for it a couple of times now.
> > >
> > > Why do this when you can just have Castor marshall the object
> > > into XML?
> > >
> > > At any rate, in applications I've built in the past where I
> > > wasn't using
> > > Castor, I implemented both toString() and toXml() methods.
> > >
> > > Bruce
> > > --
> > > perl -e 'print
> > > unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
> > >
> > > -----------------------------------------------------------
> > > 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
>
> -----------------------------------------------------------
> 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