'Output bytes as XML.
Returns:
Base64 encoded version of itself for safe insertion in to an XML document.'

def ToXml(self):

    encoded = base64.urlsafe_b64encode(self)
    return saxutils.escape(encoded)
