tags:

views:

118

answers:

2

In order to merge independant HTML changes, I'm looking for recomendations for a 3-way comparison / merge library for HTML. The common 3-way text merge algorithms perform poorly because they do not understand the tree like structure of HTML and XML. Of course, such a library must understand the looser syntax of HTML, i.e. tags are not always closed. My platform is .Net.

A: 

A simple google search offered up: Differ. I've never used it so I can't vouch for the quality of that :-)

Joel Martinez
Differ does not seem to diff HTML and XML in a tree fashion - just lines, same old stuff diff does ;)
Daren Thomas
+1  A: 

You could also just go cheep: Run the files through tidy and then compare. This will result in similar structures, where new / deleted children will show up with traditional diff tools. It breaks down on removal / addition of surrounding nodes - good luck on solving that one...

Also, the XML Notepad (sorry, couldn't find a link that works on microsoft.com) by Microsoft can compare XML files and does this in a tree based fashion.

Daren Thomas