DamageDetector is a free, macOS-only tool that quickly and precisely finds issues which cause an XML import to fail. These issues include:
Bad Characters
It is possible to paste a character into some calculation or field that you couldn't normally type into FileMaker. These include non-printing (lower) ASCII characters such as a NULL or a vertical tab. These characters are not encoded by FileMaker, and result in bad characters. Damage DetectoR can find these.
Corrupted Objects
Sometimes a FileMaker object will become slightly corrupted, which effects only the XML that is formed. In this case a tag in the XML is not closed, causing XML parsers to fail. DamageDetectoR can find these as well.
Text Strings over 10mb
Some settings in FileMaker can produce a block of text that is over 10mb.
The tool finds the issues above and also makes clear where the issue is located by reading the XML structure from the error up to the layout or object or calculation.
DamageDetectoR is a quick tool to use only when an XML import fails. It identifies the issues and shows you where they are. That's it. DamageDetectoR does not do any other analysis on the file.
It is worth noting too that the issues found by DamageDetectoR may or may not cause the entire file to stop being usable. These are not, strictly speaking, database corruption issues.
Many people will not need this for their entire development career. However, when an XML import fails, this tool will be invaluable.