public List<Element> createQueryProfileTypes(List<NamedReader> queryProfileTypeReaders, QueryProfileTypeRegistry registry) {
        List<Element> queryProfileTypeElements = new ArrayList<>(queryProfileTypeReaders.size());
        for (NamedReader reader : queryProfileTypeReaders) {
            Element root = XML.getDocument(reader).getDocumentElement();
            if ( ! root.getNodeName().equals("query-profile-type")) {
                throw new IllegalArgumentException("Root tag in '" + reader.getName() +
                                                   "' must be 'query-profile-type', not '" + root.getNodeName() + "'");
            }

            String idString = root.getAttribute("id");
            if (idString.isEmpty())
                throw new IllegalArgumentException("'" + reader.getName() + "' has no 'id' attribute in the root element");
            ComponentId id = new ComponentId(idString);
            validateFileNameToId(reader.getName(), id,"query profile type");
            QueryProfileType type = new QueryProfileType(id);
            type.setMatchAsPath(XML.getChild(root, "match") != null);
            type.setStrict(XML.getChild(root, "strict") != null);
            registry.register(type);
            queryProfileTypeElements.add(root);
        }
        return queryProfileTypeElements;
    }
Read the XML file readers into a registry. This does not close the readers.
This method is used directly from the admin system.
container-search/src/main/java/com/yahoo/search/query/profile/config/QueryProfileXMLReader.java