Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
License

xmldiff library



The xmldiff.jar jar library contains the code that you can use in your own application.

Overview

Main Article: Comparison result

The XMLDiffWindow is a JPanel subclass which can be used to create a component to show the differences between two XML or XSD files.

Usage

To create the panel showing the comparison, you only need the following code:
   XMLDiffWindow diffPanel = new XMLDiffWindow();
   diffPanel.setFiles(<the left file>, <the right file>);
   diffPanel.runCompare();

Refreshing the window content

The XMLDiffWindow.reload will refresh the comparison taking into account:
  • The current left and right files content
  • The current rules configuration

Lower-level API

The XMLComparator is a lower-level class (used by the previous one) which produces a comparison but don't create an associated GUI.

The comparison produces a ComparisonModel which hold the comparison between the two files.

See also


Categories: core | usage

xmldiff Copyright (c) 2024 Herve Girod. All rights reserved.