To summarise, addressing your requirements:

  1. Comparison tool that can compare XSD files: Yes
  2. Can identify changes in structure, not just content of XSD files: Yes
  3. Can ignore expected changes: Yes
  4. Orderless comparisons; avoiding false positives from moved elements: Yes
  5. Compare all files at once: Yes, through batch processing
  6. Produce a report with the details: Unclear what is needed here

XML Compare, developed by DeltaXML, is a structurally aware XML comparison tool that is able to identify change in both the structure and the content of XML files, including XSD.

In instances where elements have moved in the file but the order of said elements is not significant to the comparison, XML Compare has built in functionality for Comparing Orderless Elements. This can be customised extensively using XSLT as needed.

When you are expecting changes that do not need to be identified as change, you can use XML Compare's built in Ignoring Changes functionality which can again be customised using XSLT.

For bulk processing of your files, although XML Compare only compares files 1-to-1, it can be run via the command line, REST API and Java API. This means that by writing a batch file to queue up comparison operations, or if you use the REST API the comparison operations will be queued automatically.

Finally, to address your need for a report summarising the results, this depends on what you mean. XML Compare is capable of producing HTML reports from diff outputs that highlight changes in-line or side-by-side. It sounds however like you may be looking for a more statistical report on the results of the comparisons, for which XML Compare does not currently have a facility. It is worth noting however that the diff outputs produced by XML Compare are valid XML, and can be readily processed to identify the change attributes in the file.

Disclosure: I am an employee of DeltaXML.

Answer from OliverXML on Stack Exchange
🌐
GitHub
github.com › yoep › xsd-compare
GitHub - yoep/xsd-compare: Compare different XSD (XML Schema) version files to each other in a visualized way. · GitHub
XSD Compare allows you to compare different versions of XML schema files against each other and gives a visual representation of the difference(s).
Starred by 19 users
Forked by 10 users
Languages   Java 99.8% | CSS 0.2%
Top answer
1 of 3
4

To summarise, addressing your requirements:

  1. Comparison tool that can compare XSD files: Yes
  2. Can identify changes in structure, not just content of XSD files: Yes
  3. Can ignore expected changes: Yes
  4. Orderless comparisons; avoiding false positives from moved elements: Yes
  5. Compare all files at once: Yes, through batch processing
  6. Produce a report with the details: Unclear what is needed here

XML Compare, developed by DeltaXML, is a structurally aware XML comparison tool that is able to identify change in both the structure and the content of XML files, including XSD.

In instances where elements have moved in the file but the order of said elements is not significant to the comparison, XML Compare has built in functionality for Comparing Orderless Elements. This can be customised extensively using XSLT as needed.

When you are expecting changes that do not need to be identified as change, you can use XML Compare's built in Ignoring Changes functionality which can again be customised using XSLT.

For bulk processing of your files, although XML Compare only compares files 1-to-1, it can be run via the command line, REST API and Java API. This means that by writing a batch file to queue up comparison operations, or if you use the REST API the comparison operations will be queued automatically.

Finally, to address your need for a report summarising the results, this depends on what you mean. XML Compare is capable of producing HTML reports from diff outputs that highlight changes in-line or side-by-side. It sounds however like you may be looking for a more statistical report on the results of the comparisons, for which XML Compare does not currently have a facility. It is worth noting however that the diff outputs produced by XML Compare are valid XML, and can be readily processed to identify the change attributes in the file.

Disclosure: I am an employee of DeltaXML.

2 of 3
2

That's quite a challenge, because so many differences are possible: you may have to make compromises depending on what you actually encounter. (For example, you may or may not need to bother with named model groups, depending on whether either of the schemas you are comparing actually uses them. Most schemas don't.)

If I were doing this (and of course I'm biased towards using my own tools) I would start by using Saxon's schema validator to generate SCM (schema component model) files for both schemas. This will do a fair bit of normalization, e.g. handling the difference between inline types and references to named global types. I would then write an XSLT stylesheet to do further normalization on the SCM files, for example sorting components into a canonical order, sorting enumeration values, and so on; also, eliminating the parts of the SCM files that aren't relevant, such as finite state machine details. I would then probably write a custom XSLT comparison module to compare the two normalized SCM files (along the lines of https://dvcs.w3.org/hg/xslt30-test/file/tip/runner/compare.xsl which is used for comparing XSLT test results) - the key being that you don't just want a boolean answer saying whether they are the same or different, you want to highlight the differences. Alternatively you could use fn:deep-equal to test whether they are the same, and then using a visual diff tool to examine them side-by-side if not.

🌐
TextCompare
textcompare.org › xml
Online Xml Compare Tool
Just click Compare button to view side by side comparison. View the differences highlighted in colors. Privacy: This tool does all the processing on your browser, so nothing is saved on our server unless you choose to save.
🌐
CoreFiling
corefiling.com › home › open source tools › xml comparison tool
Free Online XML Comparison Tool
June 20, 2025 - CoreFiling XML Differences uses XML Pretty Printer and diff to display differences between XML files in an easy-to-read format.
🌐
Altova
altova.com › xmlspy-xml-editor › compare-xml
Compare XML Files | Altova
DiffDog also supports XML-aware comparisons, including graphical XML Schema differencing and will automatically generate an XSLT stylesheet to transform XML documents to the new XSD.
🌐
Altova
altova.com › manual › DiffDog › diffdogenterprise › dd_xmlschemacomp.html
Altova DiffDog 2026 Enterprise Edition
Altova website: Compare XML The comparing XML Schemas mechanism works as follows: You load the two XML Schemas to compare. If an XML Schema has more than one global element,
🌐
Liquid Technologies
liquid-technologies.com › compare-xml-files
Compare XML Files
Compare XML files side by side using an XML aware differencing engine · Graphical Display of added/removed/move XML Elements and Attributes ... An introduction to the Liquid Studio IDE, including XML Schema Editing, XML Editing and XPath tools.
🌐
FreeFormatter
freeformatter.com › xml-validator-xsd.html
Free Online XML Validator Against XSD Schema - FreeFormatter.com
Validates the XML string/file against the specified XSD string/file. XSD files are "XML Schemas" that describe the structure of a XML document. The validator checks for well formedness first, meaning that your XML file must be parsable using a DOM/SAX parser, and only then does it validate ...
Find elsewhere
🌐
Valters
valters.github.io › xsdiff
XsDiff XSD Diff Tools
Compare XML XSD schemas providing semantic diff, simple and straight differences report
🌐
Gridml
gridml.com › xsd-diff-tool
Grid-ML XML Schema Viewer
Lighting fast XML schema viewer. View search results as you type, filter by node type. Explore all the locations where an item occurs. Navigate to ancestors and children of each item, see their description, type details, and enumerated values.
🌐
Minifier
minifier.org › xml-compare
XML Compare - Online XML Diff Checker
Quickly compare XML files online. Highlight differences in structure, tags, and values with our XML Compare tool. Simplify file validation and save time!
Top answer
1 of 2
3

My approach to this was to canonicalize the representation of the XML Schema.

Unfortunately, I can also tell you that, unlike canonicalization of XML documents (used, as an example, to calculate a digital signature), it is not that simple or even standardized.

So basically, you have to transform both XML Schemas to a "canonical form" - whatever the tool you build or use thinks that form is, and then do the compare.

My approach was to create an XML Schema set (could be more than one file if you have more namespaces) for each root element I needed, since I found it easier to compare XSDs authored using the Russian Doll style, starting from the PSVI model.

I then used options such as auto matching substitution group members coupled with replacement of substitution groups with a choice; removal of "superfluous" XML Schema sequences, collapsing of single option choices or moving minOccurs/maxOccurs around for single item compositors, etc.

Depending on what your XSD-aware comparison tool's features are, or you settle to build, you might also have to rearrange particles under compositors such as xsd:choice or xsd:all; etc.

Anyway, what I learned after all of it was that it is extremely hard to build a tool that would work nice for all "cool" XSD features out there... One test case I remember fondly was to deal with various xsd:any content.

I do wonder though if things have changed since...

2 of 2
3

Membrane SOA Model - Java API for WSDL and XML Schema

package sample.schema;

import java.util.List;
import com.predic8.schema.Schema;
import com.predic8.schema.SchemaParser;
import com.predic8.schema.diff.SchemaDiffGenerator;
import com.predic8.soamodel.Difference;

public class CompareSchema {

  public static void main(String[] args) {
    compare();
  }
  
  private static void compare(){
    SchemaParser parser = new SchemaParser();

    Schema schema1 = parser.parse("resources/diff/1/common.xsd");

    Schema schema2 = parser.parse("resources/diff/2/common.xsd");

    SchemaDiffGenerator diffGen = new SchemaDiffGenerator(schema1, schema2);
    List<Difference> lst = diffGen.compare();
    for (Difference diff : lst) {
      dumpDiff(diff, "");
    }
  }
  
  private static void dumpDiff(Difference diff, String level) {
    System.out.println(level + diff.getDescription());
    for (Difference localDiff : diff.getDiffs()){
      dumpDiff(localDiff, level + "  ");
    }
  }
}

  

After executing you get the output shown in listing 2. It is a List of differences between the two Schema documents.

ComplexType PersonType has changed:   Sequence has changed:
    Element id has changed:
      The type of element id has changed from xsd:string to tns:IdentifierType.
🌐
Online Text Compare
onlinetextcompare.com › xml
Compare XML files online
This tool lets you compare the differences between two XML queries.
🌐
Deltaxignia
docs.deltaxignia.com › xml-compare › latest › comparing-xml-schema
Comparing XML Schema
It is good practice when comparing files either to remove all whitespace, e.g. using an XSL script · Our intention is to provide an XSL filter that will add the required attributes for a specific type of XML file. As an example, we will use XML Schema and develop an XSL filter to add keys to any XML Schema file so that XML Compare will be able to compare two XML Schema files where, for example, the complex type definitions may appear in any order.
🌐
Altova
altova.com › diffdog
DiffDog Diff/Merge Tool | Altova
The DiffDog Schema comparison tool automatically maps schema elements with the same names. You can select different root elements for each XML Schema, and you can also manually connect dissimilar elements to map them, or override automatic element mappings.
🌐
XML.com
xml.com › articles › 2023 › 03 › 06 › visualising-xml-schemas
Visualizing XML Schemas
To address this challenge, several software tools have been developed to help visualize the structure of XML Schema files in a more intuitive and user-friendly way. In this article, we will compare five such tools: XSD / WSDL Visualizer, Altova XML Spy, Liquid XML Studio, Oxygen XML Author, ...
🌐
Oxygen XML
oxygenxml.com › xml_diff_and_merge.html
Oxygen Compare and Merge Tools
Oxygen provides a simple means of performing file and folder comparisons. The complete XML diff and merge solution offers directory, file, 3-way, and XML fragment comparisons, six different algorithms, and multiple levels of comparison.