2

I have a requirement to find out the differences between XML files of the current release and previous release, and report the differences in HTML format. These XML files are packaged in a jar during the build of their modules (in Maven), and are stored in our repository. I need to find and report differences during this Maven build process, and hence I am looking for a Maven plugin.

I found similar questions, but these are pretty old, and I was wondering if we have something latest:

Is writing a Maven plugin with XMLUnit the best way to go with this? Do we have any Maven plugins?

1
  • I have in the past used BeyondCompare to perform such a task manually. It has features custom tailored to XML files that make it slightly easier to do it - still a lot of work. And no it does not generate HTML reports.
    – tmj
    May 18, 2019 at 17:10

1 Answer 1

-2

To summarise, addressing your requirements:

  1. Comparison of XML Files: Yes
  2. Difference Report in HTML Output: Yes
  3. Maven Plugin: No, but accessible via command line and APIs.

XML Compare, developed by DeltaXML, is capable of producing a structurally aware XML diff output from two input files. Valid XML goes in, and valid XML comes out with the changes identified by the addition of new attribute that indicates whether the content or structure was present in the A input, present in the B input, and if it is the same in both or has changed.

Regarding your requirement for a HTML output format, there are multiple options available using XML Compare. Side-by-side and in-line change HTML diff reports can be produced with some of the pre-configured pipelines. If you need something in a more specific format, it is possible to configure your own outputs using XSLT, or by using other pre-configured options. You can see an example of the side-by-side output below:

enter image description here

Although there is no Maven plugin for XML Compare, it can be run via the command line, or via it's REST and Java APIs, meaning it can be easily integrated into other applications and workflows.

Disclosure: I am an employee of DeltaXML

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Oct 14, 2022 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.