users@jaxb.java.net

Re: Difference between calling marshaller vs. just calling "toString()" on the JAXB-generated object?

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Tue, 5 Jan 2010 09:50:00 +0100

Using JAXB to marshal object data to XML takes care of such mundane tasks as
- providing tags and attribute names
- XML punctuation (", <, >, =)
- escaping of XML special characters
- correct representation according to encoding
- indentation (on request)

Need more?
-W

On Tue, Jan 5, 2010 at 12:49 AM, KARR, DAVID (ATTCINW) <dk068x_at_att.com>wrote:

> If I have an object that contains data mapped through JAXB, and I need
> to marshal it to XML, what exactly is the tradeoff between using the
> marshaller object, as opposed to just calling "toString()" on the
> object? I'm looking at some primitive example code that just uses the
> latter strategy, and I'm wondering what the risks of doing that would
> be.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>