in reply to XML file difference highlights

Sounds like you need XML::DifferenceMarkup and one or more of the many, many email composition and sending modules.

format them in such a way that they can be easy to view

This suggests that you don't yet have a real spec, since "easy to view" is very subjective. As ever, the process should be:

  1. Detailed spec
  2. Algorithm
  3. Tests
  4. Code

(although you might promote Tests to 2 if you fancy it)

Replies are listed 'Best First'.
Re^2: XML file difference highlights
by choroba (Cardinal) on Jun 14, 2017 at 16:47 UTC
    See also comparing XML files.

    I still use the following bash script to compare XML files and usually find its output informative enough, if not more readable than various XML oriented diff tools.

    #!/bin/bash a=($@) b=$# f2=${a[$((--b))]} f1=${a[$((--b))]} diff "${a[@]:0:$b}" \ <(xmllint --c14n "$f1" |xmllint --format -) \ <(xmllint --c14n "$f2" |xmllint --format -)

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,