Just found this to be very useful as I have several XML files and after making some changes its nice to make sure that they are still well-formed.
This terminal command will throw DTD errors, which can be fine if you don’t use them (DTD is not mandatory).
[pastacode lang=”bash” manual=”xmllint%20–valid%20–noout%20**%2F*.xml” message=”” highlight=”” provider=”manual”/]