xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Le Hors <leh...@us.ibm.com>
Subject Re: Yet another question about creating a Document
Date Thu, 19 Oct 2000 17:45:38 GMT
Eric Hodges wrote:
> 
> Can anyone tell me why DOMImplementation.createDocument() creates an element
> in the Document?  I can work around it by removing the element every time I
> call this, but it makes me think I'm not using it correctly.

Because it was thought that it would save the caller the trouble of
doing it. Realize that if it didn't there would be people saying: "why
doesn't it create the element for me since I always have to have one
anyway?" ;-)

I personaly don't think either way is better than the other. There are
times when one way will be better and times when it will be the other
one.

Why don't you simply start from the element that is created for you
instead of throwing it away to put another one in place?
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

Mime
View raw message