[XML-SIG] Re: [BUG] xml.dom.minidom on Windows.

Fredrik Lundh fredrik@pythonware.com
Thu, 10 Apr 2003 12:13:00 +0200


Mark Bucciarelli wrote:

> The attached code snippet produces peculiar results on Windows.
> Namely, it truncates text node data when there is only one grandchild
> tag.

your snippet is broken: a DOM tree builder can use any number of text
nodes (including empty nodes) to represent a single text string in the
original XML file.

(either due to buffering, or because the XML file contains plain text
mixed with entities and CDATA sections).

either change your code to deal with this, or call the "normalize" method
before processing the node.

</F>