Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAXB, JAXB_FORMATTED_OUTPUT property, levels of indentation

834151Feb 21 2012 — edited Feb 22 2012
Is it possible to provide greater control over formatted output, especially indentation, than appears to be possible with the JAXB_FORMATTED_OUTPUT property?

Currently, when I reach the 10th level of indentation, the formatted output shifts back to the left margin and restarts indentation. For a large data file, this can be disconcerting, and is definitely not what is desired.

I cannot find any way of turning off this behavior. I found, on the web, references to a property called "com.sun.xml.bind.indentString", but when I try to set this to, for example, two spaces rather than four, it throws a PropertyException, and the Marshaller documentation does not list this as a supported property.

Can anyone tell me if I can turn off this behavior, or change the number of levels of indentation before the left-shift-back-to-margin is triggered?

Thanks.

¦{Þ
This post has been answered by jtahlborn on Feb 22 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2012
Added on Feb 21 2012
8 comments
14,855 views