Tim Bray wrote,
> OK, I checked with my local DOM expert who said:
>
>- if you're creating documents, you're using level 2 DOM, which means
> that the spec's not frozen and if it's getting in the way it can be
> fixed
>- at the current time, the createDocument method creates a document
> along with a root element, so if you just serialize that, you're
> always going to get at least one start-tag & end-tag
Ah, yes, there are two questions here, and I missed the first one in my
earlier reply.
1. Can a document be created that does not have a root element?
This is a DOM level 2 question; the capability is not currently
provided by the createDocument method.
2. Can a text node be a child of a document node? This is a DOM
level 1 question, and the answer is no, which is why the Xerces
DOM implementation was testing for and disallowing it.
-- Andy