Re: Create a Document from scratch

> How is it possible to create a Document or Document
>Impl from scratch ?

As of DOM Level 2, a createDocument() factory method has been added to the
DOMImplementation object.

This still leaves you with the problem of obtaining the DOMImplementation.
We don't yet have a portable solution for that; you have to use whatever
mechanism your DOM provides. Since you mentioned DocumentImpl, I presume
you're using the IBM/Apache DOM; if so, you'd want to use the
DOMImplementationImpl.getDOMImplementation() method. Other DOMs will have
other ways of doing this.

(At some point, someone has to explicitly specify which implementation of
the DOM you want to load, and it's hard to define a default mechanism that
works in multiple programming languages. DOM Level 3 may have a solution
for Java users, at least...)


______________________________________
Joe Kesselman  / IBM Research

Received on Monday, 6 November 2000 08:44:38 UTC