[jdom-interest] Re: Fast or Safe?
Kevin.Hunt at ariba.com
Fri Sep 1 14:06:02 PDT 2000
Just a lurker on the list, but...
My vote is for no factory for element creation, and little or no up-tree
checking. What drew me to JDOM in the first place were its simplicity (I
can teach a Java newbie how it works in no time; a factory is a higher-level
concept and removes the "new" syntax that people are used to when creating
new objects), and its speed (heck, even the O'Reilly book says it's nearly
as fast as SAX). I think we're making this overcomplicated for the
relatively small number of problems that would arise.
Why not just throw an exception when XMLOutputter hits an element it already
touched? That would at least alert the programmer that they're
creating/adding elements in a bad way. Or perhaps add a method to Document
that would remove any infinite element recursion?
This message does not represent the views of Ariba...
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of David W. Smiley
> Sent: Friday, September 01, 2000 12:34 PM
> To: mago at mail.internet.com.mx
> Cc: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] Re: Fast or Safe?
> > I wonder what percentage of the programs using JDOM are
> only using it to
> > parse
> > and extract information from an XML file by using a SAXBuilder or
> > DOMBuilder, and
> > therefore do not have any line of code where they
> explicitly create an
> > Element
> > (or Attribute, etc.). If SAXBuilder and DOMBuilder use a
> default factory
> > unless told
> > otherwise, then none of those programs would be affected.
> > --
> > Gerardo Horvilleur
> > mago at mail.internet.com.mx
> It's probably a small amount and will remain to be.
> Regardless; JDOM is
> in beta and I think any change deemed for the better should
> be made now
> while we can before we lock ourselves in.
> -- David Smiley
> To control your jdom-interest membership:
uraddr at yourhost.com
More information about the jdom-interest