xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Visco <kvi...@exoffice.com>
Subject Re: Sun's XML API Specification...
Date Fri, 03 Dec 1999 20:48:26 GMT


Pierpaolo Fumagalli wrote:

> Hi Duncan, hallo all...
>
>         I just downloaded the Java API for XML Parsing Specification (Version
> 1.0 - Public Draft 1) and wanted to give some feedback and have a couple
> of answers...
>
> The API is pretty simple, but really valuable in its briefness (good
> job!), but I don't yet understand why you called it DocumentBuilder,
> instead of DOMParser (wich is more in line with SAXParser).

I actually like DocumentBuilder better.  DOMParser is not such a good name in
that it implies something that parses a DOM, and doesn't "build" a DOM Document.


> I know that
> in DocumentBuilder one can also get an empty implementation of
> org.w3c.dom.Document, but...
>
> Then, I didn't really understand why you have two factories. All methods
> are the same, but one, newParser(). It would be much more clean to have
> just one ParserFactory and have the two static methods newSAXParser()
> and newDocumentBuilder() [call it newDOMParser(), please!].
>

DocumentBuilder is a good name, though I could also make the argument that
SAXParser is not a good name. Actually I think it should be newSAXEventGenerator,
or something like that.

-K


Mime
View raw message