- From: Philippe Le Hegaret <plh@w3.org>
- Date: Fri, 19 Mar 2004 11:25:39 -0500
- To: Jaspreet Singh <Jasingh@quark.co.in>
- Cc: WWW DOM <www-dom@w3.org>
On Fri, 2004-03-19 at 11:16, Jaspreet Singh wrote: > Hi All > > A DOMDocument is just a container. So why is it derived from DOMNode? DOMNode is also a container, with children, etc. > For invoking DOMNode functions we should get the DocumentElement from > the Document and then invoke the functions we need. > > I am trying to implement the DOMDocument interface and I'm quite > puzzled as to what should be the impl for getFirstChild, etc. getFirstChild would return the document element, or a processing instruction if any, etc. Have a look at section 1.1.1 regarding the possible children of a Document node, or appendix C.1.1 on how to map the Infoset to a Document node. Philippe
Received on Friday, 19 March 2004 11:25:40 UTC