[jdom-interest] XMLOutputter behavior

Alex Rosen arosen at silverstream.com
Mon Jun 18 08:12:29 PDT 2001


> > It may be appropriate to have another set method that could
> > turn off the extra newlines.
>
> One for each?  Or three binary flags?

Having a flag for each seems like way overkill to me. No point in complicating
the API for such a trivial feature. The only reason I can think of to turn them
off would be to save bytes, in which case you'd turn them all off. They have no
impact on the meaning of the document.

> Should turning on indents automatically turn on newlines?  I can't
> really think of a case where you would want indents without newlines.
> (And even if someone does have such a case, they can get that behavior
> by calling setNewlines(false) *after* calling setIndent(true).)

True, but automatically turning them on seems too clever to me. It's a lot
easier to just turn both on, than to try to remember which setting
automatically turns on the other one.

Alex




More information about the jdom-interest mailing list