tags:

views:

394

answers:

1

For data validation, for example during migrations from one XML library to a new one, we need to make sure that the old and the new text are the same.

For small files, comparing can be done manually, but for large files it would save time to see only the lines which are different, missing or new.

Do you know a simple but reliable diff unit for Delphi, which can scan two documents and collect informations about lines with different content?

The unit should support WideString (for XML text).

+5  A: 

TDiff? Source for the diffing component is inside. If you're using Delphi 2009, it should handle Unicode strings without much difficulty. Otherwise you might need to make some changes to handle WideStrings, but it doesn't look like it'd be too painful to modify. The diff unit itself is slightly less than 28K.

afrazier
I took the liberty of adding the link for you :) Check out the help button in the editor toolbar for information on the markup syntax.
onnodb
@onnodb - +1 for that link, some interesting looking stuff there.
robsoft