Comparing two minidom objects

Skip Montanaro skip at
Mon Nov 8 19:33:24 CET 2004

I'd like to compare two xml.dom.minidom objects, but the naive attempt fails:

>>> import xml.dom.minidom
>>> d1 = xml.dom.minidom.parse("ES.xml")
>>> d2 = xml.dom.minidom.parse("ES.xml")
>>> d1 == d2

My goal is to decide whether or not I need to prompt the user to save config
information at the end of a program run by generating a minidom object then
comparing it with the last saved version.



More information about the Python-list mailing list