public static String introduceXMLEntities(String inputString) {
    StringBuffer stringBuffer = new StringBuffer();
    int length = inputString.length();
    char c;
    for (int i = 0; i < length; i++) {
      c = inputString.charAt(i);
      if (ENTITY_REFERENCES.containsKey(new Character(c))) {
        stringBuffer.append(ENTITY_REFERENCES.get(new Character(c)));
      } else {
        stringBuffer.append(c);
      }
    }
    return stringBuffer.toString();
  }