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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT