I have two XML files (XSD) which are generated by some tool.
The tool doesn\'t preserve the order of elements so although the content is equal comparing it as text will resu
For what it's worth, I have created a java tool (or kotlin actually) for effecient and configurable canonicalization of xml files.
It will always:
In addition you can tell it to:
has changed.
entries in
has changed.It uses XSLT and does all the above efficiently using chaining.
It does support sorting nested lists - sorting innermost lists before outer. But it cannot reliably sort arbitrary levels of recursively nested lists.
If you have such needs you can - after having used this tool - compare the sorted byte arrays of the results. they will be equal if only list sorting issues remain.
You can get it here: XMLNormalize