code: private String resolvePredefinedOrCharacterEntity(String entityName) {
          // Character references, section 4.1 of the XML specification.
          if (entityName.startsWith("#x")) {
              return resolveCharacterReference(entityName.substring(2), 16);
          } else if (entityName.startsWith("#")) {
              return resolveCharacterReference(entityName.substring(1), 10);
          }
          // Predefined entities, section 4.6 of the XML specification.
          if ("lt".equals(entityName)) {
              return "<";
          } else if ("gt".equals(entityName)) {
              return ">";
          } else if ("amp".equals(entityName)) {
              return "&";
          } else if ("apos".equals(entityName)) {
              return "'";
          } else if ("quot".equals(entityName)) {
              return "\"";
          } else {
              return null;
          }
      }
docs: Returns the replacement text or null if {@code entity} isn't predefined.