Re: setting document root element

DOM Level 1 didn't specify how the root element was created, but I believe
it did say it couldn't be removed.

DOM Level 2 said the root element could be created only at the time the
document was created, and still didn't permit removing it. The rationalle
has to do with potentially using information about the root element's
namespace and localname, along with the document type information, to
select among different DOM implementations/subclasses.

Last I checked, DOM Level 3 was considering adding the ability to set the
root element after the Document had been created, and as a result was
considering allowing folks to return to that state by removing the root
element.  This does cause some problems for folks who want to subclass, but
the Embedded DOM capability appeared to offer an alternative solution for
those users. I'm not sure of the current status; check the Level 3 Working
Draft.

______________________________________
Joe Kesselman  / IBM Research

Received on Monday, 12 November 2001 10:35:54 UTC