public static void validateFilesInIncludedDir(String dirName, Node parentNode, ApplicationPackage app) {
        if (! (parentNode instanceof Element)) {
            throw new IllegalStateException("The parent xml node of an include is not an Element: " + parentNode);
        }
        String parentTagName = ((Element) parentNode).getTagName();

        List<Element> includedRootElems = Xml.allElemsFromPath(app, dirName);
        for (Element includedRootElem : includedRootElems) {
            validateIncludedFile(includedRootElem, parentTagName, dirName);
        }
    }
Helper methods for directories included from services.xml in a &lt;include dir=''/&gt; element.

@author gjoranv
@since 5.1.19
config-application-package/src/main/java/com/yahoo/config/model/application/provider/IncludeDirs.java