users@jaxb.java.net

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

From: KARR, DAVID (ATTCINW) <"KARR,>
Date: Mon, 4 Jan 2010 15:49:55 -0800

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.