Difference camparison fails when an element value is updated to null. Sample1: <root><firstChild>first</firstChild><secondChild>secondChild</secondChild></root> Sample2: <root><firstChild>first</firstChild><secondChild></secondChild></root> Diff diff = new Diff(oldXml, newXml); DetailedDiff detDiff = new DetailedDiff(diff); List<Difference> differences = detDiff.getAllDifferences(); Collections.sort(differences, new Comparator<Difference>() { @Override public int compare(Difference o1, Difference...