Most code editors are capable of validating the
info.xml while you’re editing
it. To ensure that the document remains valid, it’s possible to add a check
on your continuous integration service.
xmllint is a small CLI tool that can be used to validate
info.xml. To do
that you first have to download the schema, e.g. with
Download, validation and cleanup are three simple steps:
wget https://apps.nextcloud.com/schema/apps/info.xsd xmllint appinfo/info.xml --schema info.xsd --noout rm info.xsd
A complete and working configuration can be found in the Mail app.
Note that the currently distributed schema on apps.nextcloud.com is slightly outdated and thus elements of Nextcloud’s current info.xml are wrongly reported as invalid. This was fixed recently and the next appstore deployment will update the schema as well.
If you’d like to learn more about the
info.xml file, I recommend to take a
look at the Nextcloud Developer Manual
that explains this file in more detail.
Update 2018-03-06: Added info about Nextcloud 14’s XML validation.