def escapeAttr(value):
  """Utility function for escaping xml attribute values.

  @param value: The string to XML attribute escape.

  @return: The escaped XML attribute string.
  """
  value = value.replace("&", "&amp;")
  value = value.replace("'", "&apos;")
  value = value.replace('"', "&quot;")
  return value