[jdom-interest] output package - XMLOutputter API question

Jason Hunter jhunter at servlets.com
Thu Jul 20 17:30:42 PDT 2006


Rick Beton wrote:
> Wouldn't it be simpler just to have one output(Content, Writer) and one 
> outputString(Content) method instead?
> (plus of course the overloaded methods that take a Document and a List)
> 
> The implementation of this single method would be similar to that of the 
> method that takes a List, i.e. it would have to test using instanceof 
> and call the appropriate printCDATA / printComment / ... methods.

I don't recall if we had a reason not to go that way -- except that 
Content was introduced late and the outputter was already working well 
(after much effort).  To the caller there's not a lot of difference, and 
which is better interanl style could be debated.

-jh-



More information about the jdom-interest mailing list