code: def string_literal(content):
      
  
      if '"' in content and "'" in content:
          # there is no way to escape string literal characters in XPath
          raise ValueError("Cannot represent this string in XPath")
  
      if '"' in content:  # if it contains " wrap it in '
          content = "'%s'" % content
      else:  # wrap it in "
          content = '"%s"' % content
  
      return content
docs: Choose a string literal that can wrap our string.
  
      If your string contains a ``\'`` the result will be wrapped in ``\"``.
      If your string contains a ``\"`` the result will be wrapped in ``\'``.
  
      Cannot currently handle strings which contain both ``\"`` and ``\'``.