Comparing two minidom objects
Skip Montanaro
skip at pobox.com
Mon Nov 8 13:33:24 EST 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
False
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.
Thx,
Skip
More information about the Python-list
mailing list