How to compare two xml files in python in script? -


i new python. have predefined xml files. have script generate new xml files. want write automated script compares xmls files , stores name of differing xml file names in output file? in advance

i think you're looking filecmp module. can use this:

import filecmp cmp = filecmp.cmp('f1.xml', 'f2.xml')  # files equal if cmp:     continue else:     out_file.write('f1.xml')  

replace f1.xml , f2.xml xml files.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

image - ClassNotFoundException when add a prebuilt apk into system.img in android -