code: public static char decodeEntity(String name) {
      	if (name.startsWith("#x")) {
      		try {
      			return (char)Integer.parseInt(name.substring(2),16);
      		}
      		catch(NumberFormatException nfe) {
      			return '\0';
      		}
      	}
      	if (name.startsWith("#")) {
      		try {
      			return (char)Integer.parseInt(name.substring(1));
      		}
      		catch(NumberFormatException nfe) {
      			return '\0';
      		}
      	}
      	Character c = (Character)map.get(name);
          if (c == null)
              return '\0';
          else
              return c.charValue();
      }
docs: Translates an entity to a unicode character.
  
  @param	name	the name of the entity
  @return	the corresponding unicode character