in reply to cmp two HTML fragments
A much older thread, yet containing some interesting ideas: HTML Document Comparison
HTH,