[jdom-interest] XMLOutputter
Alex Chaffee
guru at edamame.stinky.com
Sat Aug 5 09:36:31 PDT 2000
No it's not a red herring. I'm not talking about using the defaults:
I'm talking about specifying options. Sure, if you use the defaults,
this whole issue is moot. If you have some settings to set, keeping
the settings in the object makes the API simpler.
Another thought-provoking question: if the options are in a separate
object, won't that mean that XMLOutputter's *only* instance variable
is the pointer to options? Seems like a clue that it's a useless
level of indirection.
- A
On Fri, Aug 04, 2000 at 05:46:24PM -0400, Elliotte Rusty Harold wrote:
> At 7:05 AM -0700 8/4/00, Alex Chaffee wrote:
> >My other, more pragmatic motivation for keeping the options inside the
> >object is it simplifies the API.
> >
> > XMLOutputter o = new XMLOutputter(true, " ");
> >
> > vs.
> >
> > XMLOutputter o = new XMLOutputter( new XMLOutputFormat ( true, " ") );
> >
> >
>
> This is a red herring. In either case we can very easily provide:
>
> XMLOutputter o = new XMLOutputter();
>
> which would simply set up the defaults, whether those defaults are
> implemented in this class or a different class.
>
> +-----------------------+------------------------+-------------------+
> | Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
> +-----------------------+------------------------+-------------------+
> | The XML Bible (IDG Books, 1999) |
> | http://metalab.unc.edu/xml/books/bible/ |
> | http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/ |
> +----------------------------------+---------------------------------+
> | Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ |
> | Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ |
> +----------------------------------+---------------------------------+
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
--
Alex Chaffee mailto:alex at jguru.com
jGuru - Java News and FAQs http://www.jguru.com/alex/
Creator of Gamelan http://www.gamelan.com/
Founder of Purple Technology http://www.purpletech.com/
Curator of Stinky Art Collective http://www.stinky.com/
More information about the jdom-interest
mailing list