public static List<Element> allElemsFromPath(ApplicationPackage app, String pathFromAppRoot) {
        List<Element> ret = new ArrayList<>();
        List<NamedReader> files = null;
        try {
            files = app.getFiles(Path.fromString(pathFromAppRoot), ".xml", true);
            for (NamedReader reader : files)
                ret.add(getElement(reader));
        } finally {
            NamedReader.closeAll(files);
        }
        return ret;
    }
Returns the root element of each xml file under pathFromAppRoot/ in the app package.
config-application-package/src/main/java/com/yahoo/config/application/Xml.java