How can I compare 2 XML files

Have a look at my post:

My solution applies to any text file. It compares line-by-line basis. It can compare any format: JSON, YAML, CSV, *.js, not only XML, It assumes that 2 files are “pretty-printed” before comparison.