[jdom-interest] Re: Fast or Safe?
Simon Harris
Haruki_Zaemon at hotmail.com
Fri Sep 1 14:26:49 PDT 2000
We create new Elements and Attributes all the time. However converting from
"new Element" to "factory.newElement" would be as simple as anything.
I'd fully support the use of factories as we often have situations where we
would like to have our own Elements created during parsing.
If the interfaces were named IElement and IAttribute and Element and
Attribute were left as default implementations, then no code changes would
be required :)
Simon.
----- Original Message -----
From: "Gerardo Horvilleur" <mago at mail.internet.com.mx>
To: "Trebor A. Rude" <trebor at bwn.net>
Cc: <jdom-interest at jdom.org>
Sent: Friday, September 01, 2000 11:03 PM
Subject: Re: [jdom-interest] Re: Fast or Safe?
> > >It would be something like: Element foo = factory.newElement("foo")
> > >which seems reasonable enough to me. It is not too different from
> > >what we have right now and it makes it possible to have multiple
> > >implementations.
> >
> > It's quite reasonable, my only concern is that it probably
breaks all
> > existing code, which we may not want to do. Fortunately we're in the
> > pre-1.0 stage, and it's easier to justify the large change. Brett?
Jason?
> > What do you think?
> >
>
> 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
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
More information about the jdom-interest
mailing list