I love JAXB. It simplified my work. I have one minor problem: the output XML is always flushed to one line. I call this a minor call, because, as a rule, I don’t care what XML does and nobody needs, and if they stumble upon and brutalize the content that I usually implement, fault-tolerant systems return to the default installation time settings. However, on several occasions I just really want to see what happens there to make sure everything is working correctly, and sometimes just to see what it does and how it is done.
Is it possible to get JAXB to serialize a class into a well-formed XML document? For example, instead of
<Class><Object>value</Object><Object2>value</Object2></Class>
sort of
<Class>
<Object>
value
</Object>
</Class>
Is it possible?