def isEqualElement(self, a, b):
        if a.tagName != b.tagName:
            print "          [XML] Different tag names: %s %s" % (a.tagName, b.tagName)
            return False

        if sorted(a.attributes.items()) != sorted(b.attributes.items()):
            print "          [XML] Different attributes..."
            return False

        if len(a.childNodes) != len(b.childNodes):
            return False

        for ac, bc in zip(a.childNodes, b.childNodes):
            if ac.nodeType != bc.nodeType:
                return False
            if ac.nodeType == ac.TEXT_NODE and ac.data != bc.data:
                print "        [XML] Different values: '%s' and '%s' in tag <%s>" % (ac.data, bc.data, a.tagName)
                return False
            if ac.nodeType == ac.ELEMENT_NODE and not self.isEqualElement(ac, bc):
                return False
        return True