How to validate Magento 2 XML files with IntelliJ IDEA or PhpStorm?

bin/magento dev:urn-catalog:generate <path to Intelij IDEA / PhpStorm project folder>/misc.xml

The misc.xml is an undocumented file at the root of an Intelij IDEA / PhpStorm project folder:


http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-urn.html

Before

After

For me the following worked from the root Magento directory:

bin/magento dev:urn-catalog:generate ./.idea/misc.xml

Yes, the misc.xml is an undocumented file at the root of an Intelij IDEA / PhpStorm project folder: