[jdom-interest] PROPOSAL: Remove most constructors from XMLOutputter (was round trip XML)

bob bob at accurev.com
Wed Oct 18 07:16:41 PDT 2000


> I'd like to do this.  Can I have a straw poll on the following?

It might be completely out-of-line, but would a Configuration
object be useful in this case?  Ever-expanding arguments
to a Constructor definitely isn't a Good Thing in my mind.

Calling setFoo() or makeFoo() 4 times after constructing
an object gets annoying also, if you do it repeatedly.

Howsabout:

	XMLOutConfiguration config = new XMLOutConfiguration();

	config.useNewlines("true");
	....
	config.stripWhitespace("true");

	XMLOutputter out = new XMLOutputter(config);

Allow folks to re-use the XMLOutConfiguration, and possibly
initialize it from a Properties or InputStream or even
a Document. 

Just pondering flexibility without increasing the API
every time something new pops up.

	-bob




More information about the jdom-interest mailing list