[jdom-interest] DOMBuilder validation -api error in DOMBuilder.java

Brett McLaughlin brett.mclaughlin at lutris.com
Thu Jun 15 13:44:28 PDT 2000

Jason Hunter wrote:
> > Interesting.  The DOMBuilder class has the flag for validation but never
> > uses it anywhere.   The reason it doesn't use is that the DOMBuilder doesn't
> > do any parsing; it's handed a DOM tree and the parsing has already happened.
> > It's the adapter that has to do the validation.  Here is slightly modified
> > code from the DOMBuilder sample to correctly turn validation on and off.
> Ah, in the latest version Brett and I are hacking on, DOMBuilder can
> again build from InputStreams, Files, etc.  For those it can do
> validation.
> What are people's opinions on keeping or deleting
> DOMBuilder.build(InputStream) and all the other methods that build from
> things other than a DOM Document?  These build() methods build a JDOM
> document by first building a DOM document, so they'll probably always
> execute slower and be more heavyweight than the corresponding SAXBuilder
> build() method.  The reason to keep them anyway is that they can be
> useful for testing (you can compare SAX built versus DOM built documents
> to make sure they're equal) and they are a valid build mechanism.  We of
> course have documentation for them that says they aren't the preferred
> build mechanism.  We'll probably say that for SAXBuilder one day too
> when we recommend SpitfireBuilder.  :-)

Actually, to augment that, there's nothing about DOM that requires it to
use SAX for building. So in future versions, it might build using
something other than SAX. For those cases I thik it's useful to keep
around, because it could be an interesting benchmark at that point.


> Opinions?
> -jh-
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

Brett McLaughlin
Enhydra Strategist
Lutris Technologies
1200 Pacific Avenue
Santa Cruz, CA  95060

More information about the jdom-interest mailing list