Validate a bunch of XML files against a bunch of XSD schema files.
Put XML into directory xml, and XSD into directory xsd. IntelliJ IDEA project file is included, just run XMLValidator.java.
The schema files should import other XSD files with <import schemaLocation="filename.xsd"> if necessary. The files are intelligently parsed so that the "master" will be detected from a bunch of them. Multiple schemas (multiple namespaces) are parsed in one run and hence can be used for validation all at once.
For both XML and schema files, a list of elements used/defined in the XML/schema is printed and also a rudimentary hierarchy of those elements in JSON format. This is for quickly getting a picture of several complex files.
NB: Needs the Jackson core, annotations and databind libraries (version 2.x), located in e.g. the lib directory.
Warning: partly AI slop 👹