code: public static String escapeForXML(final String input) {
          return input.replace("&", "&amp;")
                  .replace("<", "&lt;")
                  .replace(">", "&gt;")
                  .replace("\"", "&quot;")
                  .replace("'", "&apos;");
      }
docs: Prepares a string to be inserted into xml by escaping any reserved XML symbols.
  <p/>
  The current symbols are: < > & " '
  
  @param input The original string
  @return A string with the reserved xml characters escaped.