private static @NotNull Int2ObjectMap<String> computeMap(XmlFile xmlFile) {
    final XmlFile file = XmlUtil.findXmlFile(xmlFile, Html5SchemaProvider.getCharsDtdLocation());
    assert file != null;

    Int2ObjectMap<String> result = new Int2ObjectOpenHashMap<>();
    XmlUtil.processXmlElements(file, element -> {
      if (element instanceof XmlEntityDecl) {
        final String value = ((XmlEntityDecl)element).getValueElement().getValue();
        final int key = Integer.parseInt(value.substring(2, value.length() - 1));
        if (!result.containsKey(key)) {
          result.put(key, ((XmlEntityDecl)element).getName());
        }
      }
      return true;
    }, true);
    return result;
  }
private static @NotNull Int2ObjectMap<String> computeMap(XmlFile xmlFile)