[XML-SIG] Specializing DOM exceptions

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat, 2 Dec 2000 09:03:34 +0100


> Well, this would interfere pretty badly with 4DOM.  There is an
> xml.dom.Node.py file in 4DOM and having a Node class in the __init__
> would cause problems with the import.

What exactly would those problems be?

> What's wrong with
> 
> from xml.dom.Node import Node
> 
> n.nodeType == Node.ELEMENT_NODE

The problem is that we'd expost xml.dom.Node as a public class as
defined in the DOM, giving the impression that it is base of all other
DOM classes. Yet, when you do isinstance with a 4DOM object and that
xml.dom.Node, it will fail.

Regards,
Martin