W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: Create a Document from scratch

From: Joseph Kesselman/Watson/IBM <keshlam@us.ibm.com>
Date: Mon, 6 Nov 2000 08:43:43 -0500
To: www-dom@w3.org
Message-ID: <OFE1A67A9A.E387A830-ON8525698F.004B07E9@pok.ibm.com>

> 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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC