[jdom-interest] DOMOutputter and other thoughts
brett.mclaughlin at lutris.com
Mon Jun 12 09:56:18 PDT 2000
philip.nelson at omniresources.com wrote:
> I now have a desire/need for this as well so here are my 2 cents
> > > I've been taking a look at the DOMOutputter class
> > > and it seems that this will need to take a
> > > org.w3c.dom.DOMImplementation rather than a
> > Nope - use the JDOM adapters to get a Document from a specific parser
> > implementation. Nobody is familiar with DOMImplementation anyway...
> BUT .. if the eventual goal is to create a JDOM specific parser AND JDOM
> will support DOM, isn't a JDOM DOMDocument implementation the best way to do
JDOM does not and will never /support/ DOM. It will talk to DOM and from
DOM, nothing else.
> it? Before I realized that someone else had started this I had started
> thinking about it and had come to the same conclusion as Kevin. Certainly,
> using the adapters would be easier. For a version 1 release you could do
> something as simple as using XMLOutputter to create a XML string and then
> use an adapter to produce the DOM tree. I'm not sure how much slower that
No. You get an empty Document object from the DOM Adapaters, and then
populate that Document with Nodes, generated from the JDOM objects.
> would be than manually creating the DOM tree but the API wouldn't have to
> change to implement it with the manual DOM building step so there isn't a
> huge downside.
The mapping from JDOM to DOM is simple - I would do it myself, but I
have no time - I'm not sure if Kevin thinks about it differently, as he
seems to think it is harder than it is ;-) If I get time, I'll do it on
the plane Friday - I really don't think it should take more than 3
> > > One other thought, just a pie-in-the-sky idea, was to have the
> > > JDOM classes implement the DOM interface so that they could be
> > > used directly by DOM applications:
> > >
> > Nope. Already went down that road, and vetoed it heavily. Bad news
> > (trust us, JDOM alpha 1 was like that, and James Davidson convinced us
> > otherwise.)
> I agree. One of the great things about JDOM is that each class is so small.
> I would rather have this separated into a separate set of DOM implementation
> To control your jdom-interest membership:
More information about the jdom-interest