code: static String unescapeEntity(String e) {
          // validate
          if (e == null || e.isEmpty()) {
              return "";
          }
          // if our entity is an encoded unicode point, parse it.
          if (e.charAt(0) == '#') {
              int cp;
              if (e.charAt(1) == 'x') {
                  // hex encoded unicode
                  cp = Integer.parseInt(e.substring(2), 16);
              } else {
                  // decimal encoded unicode
                  cp = Integer.parseInt(e.substring(1));
              }
              return new String(new int[] {cp},0,1);
          } 
          Character knownEntity = entity.get(e);
          if(knownEntity==null) {
              // we don't know the entity so keep it encoded
              return '&' + e + ';';
          }
          return knownEntity.toString();
      }
docs: Unescapes an XML entity encoding;
  @param e entity (only the actual entity value, not the preceding & or ending ;
  @return