[XML-SIG] version 7 vs version 8 (Text Node)

Martin v. Loewis martin@v.loewis.de
06 Nov 2002 23:53:44 +0100


Mike Hostetler <thehaas@binary.net> writes:

> >     a_Node = xml.dom.minidom.Text("data");
> >  
> 
> I've never had problems doing it this way.
> 
> node = domTree.createTextNode("data")
> domTree.appendChild(node)  # to put it in the DOM
> 
> this assumes, of course, that you already have a DOM Tree created.  Which
> you should, anyway, from the above example.

This is the official interface, also: it is *the* DOM interface. That
Text had an __init__ was an implementation detail, which was not
documented and not supposed to be used. OTOH, createTextNode was
documented all the time, both in the Python documentation, and the W3C
DOM specification.

Regards,
Martin