I'm looking for an open source version control tool which can diff and merge XML files.
The difficulty I have to find such a tool is, that I need a correct merge of a XML file comparing the nodes and not the lines.
Any idea? Thanks!
It's possible to integrate our XML and JSON aware merge products into the Git merge process as either a merge driver or merge tool.
The XML Merge Component is a transformation component used to take incoming data from upstream SSIS source components and merge them into one SSIS column data based on the XML data structure defined in the component. This data can be then consumed by a downstream pipeline component.
Unfortunately, there's no one-size-fits-all solution to this problem. XML diffing is very sensitive to what YOU consider different. In one case the order of child nodes might be important, and in another case (maybe even in the same file) it might be irrelevant.
Take a look at XMLUnit. Even though it's aimed at unit-testing, it is a complete XML differencing engine. You have to tell it (in code) how to determine that two nodes are eligible for comparison, and then what to do with all the potential differences found (i.e. are they real or not, in your application). It detects an exhaustive list of "difference events" including
And a whole bunch more. Any of these could be important or unimportant to your application, and only you can decide. It's worth a look, but it will take some work to get what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With