我的代码:
walkAll = tree1.getiterator()
for elt in walkAll:
el=root2.find(elt.tag)
for ee in root2.iter(elt.tag):
p1=ee.getparent()
p2=el.getparent()
if p1==p2:
if ee.text !=elt.text:
print(ee.text+"****"+elt.text )