Free Support Forum - groupdocs.com

How to merge only the differences between HTML files in Java

I am trying to perform a 2 way merge with multiple HTML files. I am just running modified example code and have it running but the output is not at all what I am looking for.
Given the below diffs between file1 and file2, and then file1 and file3:

$ diff scope-v1.html scope-v2.html
18c18,19
<

  • Significant variance from the scope stated herein or to the terms and conditions of this SOW will result in a written, mutually executed Change Order.
  •   <li>Significant change from the scope stated herein or to the terms and conditions of this SOW will result in a written, mutually executed Change Order.</li>
     <li>Test LI </li>
    

    $ diff scope-v1.html scope-v3.html
    13,14c13,14
    <

  • “Business Hours” are Monday through Friday 8:00 A.M. to 5:00 P.M. (local US time). “Non-Standard Hours” include hours/testing windows/maintenance windows outside of Business Hours (“After Hours”) or any hours that fall on Optiv-recognized holidays (“Holiday Hours”).

  • <
  • All work to be performed by Optiv under this SOW will be completed during Business Hours unless Non-Standard Hours are otherwise noted.
  •   <li>"Business Hours" are Monday through Friday 8:00 A.M. to 5:00 P.M. (local US EST time). “Non-Standard Hours” include hours/testing windows/maintenance windows outside of Business Hours (“After Hours”) or any hours that fall on Optiv-recognized holidays (“Holiday Hours”).</li>
      <li>All work to be done by Optiv under this SOW will be completed during Business Hours unless Non-Standard Hours are otherwise noted.</li>
    

    I would expect the merge output to be file1 plus delta from file2 plus delta from file3. Instead Groupdocs.Merger just outputs all three files concatenated. I have experimented with different orders of what is provided to the constructor and then what is joined but always get similar results. I am attaching the example code I am using including the output file.
    I have a demo I have to give with this early next week so a quick answer would be much appreciated.
    merge-is-appending.zip (20.0 KB)

    1 Like

    We are investigating this issue at our end. Your investigation ticket ID is MERGERJAVA-539. As there’s any update, you’ll be notified.