[jdom-interest] DOMBuilder

Jason Hunter jhunter at collab.net
Mon Mar 5 14:35:54 PST 2001

"Rosen, Alex" wrote:
> We are a 10 person team who have been using JDOM for the past 3 or 4 months. I
> just searched our codebase for DOMBuilder and found 4 instances.  (They are
> using the Xerces DOMParser to parse an XML file into a DOM tree, and then
> DOMBuilder to parse this into a JDOM tree.) This is a terrible waste of
> resources, to be using DOMBuilder instead of SAXBuilder. I'd really, really
> like to get rid of them.
> 3 of the instances are setting up Xerces-specific features on the DOMParser, so
> they can't currently be converted to use SAXBuilder. I mentioned this problem a
> few weeks ago, and got this response:

What DOM properties are you setting?  What SAX properties do you want to
set?  How do you address the concerns I raised?  Specifically, what
should happen if you set a feature one way that SAXBuilder needs set the
other way?  My concerns is we've been toggling how we do namespaces by
changing the namespaces features, without any change to the public API. 
If we exposed the internals we'd lose that encapsulation.

BTW, remember you can write whatever builder you want.  We just provide
two by default.


More information about the jdom-interest mailing list