@PostConstruct
    public void init() throws ParserConfigurationException {
        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
        docBuilderFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); // Compliant
        docBuilderFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); // Compliant
        docBuilderFactory.setIgnoringElementContentWhitespace(true);
        docBuilderFactory.setValidating(false);
        docBuilderFactory.setNamespaceAware(true);

        DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();

        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        if (classLoader == null) {
            classLoader = TagLibrary.class.getClassLoader();
        }

        try (InputStream is = classLoader.getResourceAsStream(TAGLIB_XML)) {
            if (is == null) {
                throw new IOException("Resource not found: " + TAGLIB_XML);
            }
            Document doc = docBuilder.parse(is);
            NodeList nodes = doc.getElementsByTagName("tag");

            for (int i = 0; i < nodes.getLength(); i++) {
                NodeList children = nodes.item(i).getChildNodes();

                for (int j = 0; j < children.getLength(); j++) {
                    Node child = children.item(j);
                    if ("tag-name".equals(child.getNodeName())) {
                        String tagName = child.getTextContent();
                        tags.put(tagName.toLowerCase(Locale.ROOT), tagName);
                    }
                }
            }
        }
        catch (IOException | SAXException e) {
            throw new IllegalStateException("Error while reading XML: " + e.getMessage(), e);
        }
    }
Map of lowercase tag names to the real tag name.
primefaces-showcase/src/main/java/org/primefaces/showcase/view/app/TagLibrary.java