xml.dom.minidom - documentElement vs. childNodes

Diez B. Roggisch deetsNOSPAM at web.de
Mon Aug 30 22:49:52 CEST 2004

Skip Montanaro wrote:

> I'm getting somewhat painfully acquainted with xml.dom.minidom.  What is
> the relationship between its documentElement attribute and its childNodes
> list?
> I thought XML documents consisted of a single, possibly compound, node. 
> Why is a list of childNodes needed?

Maybe for reasons of orthogonality? In java, the document class implements
the node interface also. So it seems as if dom treats documents as special
cases of nodes. 


Diez B. Roggisch

More information about the Python-list mailing list