3-way structure-aware XML merge library and cli

⚓ Rust    📅 2026-01-28    👤 surdeus    👁️ 1      

surdeus

3dm-rs

Github: GitHub - 06chaynes/3dm-rs: 3-way XML diff and merge tool

This library and CLI tool can be used for complex merges of XML structures based on the thesis by Tancred Lindholm and was originally a rebuild of an implementation made in Java.

For example a comparison against the default git merge driver on xml files:

<section id="intro">  <para>This is the introduciton.</para></section>
  • Alice renames the section: id="intro"id="overview"
  • Bob fixes the typo: introducitonintroduction

default driver view

"Both Alice and Bob modified lines 1-3. I don't know which version to keep. CONFLICT!"

3dm-rs view

"Alice changed the id attribute. Bob changed the text content inside <para>. These are different parts of the element. I'll apply both changes."

result

<section id="overview">  <para>This is the introduction.</para></section>

This is pretty niche but I thought I'd share in case anyone else had need of something like this. I pulled it from another project of mine and decided to make it standalone and open.

1 post - 1 participant

Read full topic

🏷️ Rust_feed