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