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

Re: Create a Document from scratch

From: armelle clech <aclech@yahoo.fr>
Date: Tue, 7 Nov 2000 11:06:21 +0100 (CET)
Message-ID: <20001107100621.70854.qmail@web9602.mail.yahoo.com>
To: www-dom@w3c.org
Thanks for your answer.
But where can I find DOM_DOMImplementation
I know only DOMImplementation where createDocument()
method needs 3 arguments , namespace URI,
qualifiedName and docType. 
Then, I don't find a way to do what you told ?

best regards
--- Hari Haran Subramanian <haran.hari@wipro.com> a
écrit : > Hi!
> 1)First call DOM_DOMImplementation &
> DOM_DOMImplementation::getImplementation(). This is
> a static method that
> 
> will return an instance of DOM_DOMImplementation.
> 2)Next make a call to
> DOM_DOMImplementation::createDocument () method
> which will return an object of type DOM_Document.
> Please note that the createDocument (...) method
> will have an argument
> for specifying the tag name of the root element.This
> is because the DOM
> specifies that the Document object as well as the
> root element object
> must exist all the time and their life times are
> very tightly coupled.
> It should not be possible that you create the
> document object without
> the root element.
> That's why the createDocument (...) method has been
> designed such that
> the caller is forced to specify the tag name for the
> root element
> whenever he wants to create a document object.After
> this call returns,
> you will have a document object with the root
> element as its son.
> The root element will have a tag name you specified
> in the
> createDocument (...) method.
> You can call DOM_Document::getDocumentElement()
> method to get the root
> element.Once u get the root element, u can call
> appendChild(...),
> insertBefore(...) etc..
> to attach the nodes to the trees so that u end up
> with a dom tree from
> scratch without parsing of an xml file.
> Please note that I have also mentioned this in my
> reply to ur earlier
> query namely :
> " How can I instanciate this DocumentImpl ?
>  DocumentImpl's constructor needs a DocumentTypeImpl
> and
>  DocumentTypeImpl's constructor needs a DocumentImpl
> ???"
> 
> Thanks and rgds,
> 
> Hari Haran.S.
> Wipro Global R & D.
> 
> armelle clech wrote:
> 
> > How is it possible to create a Document or
> Document
> > Impl from scratch ?
> >
> > thanks
> > aclech
> >
> > =====
> > Armelle Clech
> > 06 60 70 27 66
> > aclech@yahoo.fr
> >
> >
>
___________________________________________________________
> > Do You Yahoo!? -- Pour dialoguer en direct avec
> vos amis,
> > Yahoo! Messenger : http://fr.messenger.yahoo.com
> 


=====
Armelle Clech
06 60 70 27 66
aclech@yahoo.fr

___________________________________________________________
Do You Yahoo!? -- Pour dialoguer en direct avec vos amis, 
Yahoo! Messenger : http://fr.messenger.yahoo.com
Received on Tuesday, 7 November 2000 05:06:55 GMT

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