The DOM and Factories
The DOM relies on a fairly stylized resource management strategy. Because the DOM consists solely of abstract interfaces and has no concrete classes, there is no class one can simply call new on to create new nodes. Rather, the DOM expects that all objects (except for one) are created indirectly via well-known factory methods that are exposed on several DOM interfaces. Of course, this still leaves a bootstrapping problem, as one must have an object reference in order to call a DOM-specified factory method. This is where the DOMImplementation interface comes in.
Each implementation of the DOM interfaces must provide an object that implements DOMImplementation. This object acts as a rendezvous point for all component-wide ...
Get Essential XML: Beyond Markup now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.