'Convert the element to a string.'

def tostring(self, element):

    if isinstance(element, (unicode, str)):
        return unicode(element)
    else:
        try:
            return self._tostring(element, encoding=unicode)
        except Exception as e:
            self._logger.error('%s:    unable    to    convert    to    string', self._cname, exc_info=True)
            return u''
