'Converts the Saml object to a string containing XML.
:param nspair: A dictionary of prefixes and uris to use when
constructing the text representation.
:return: String representation of the object'

def to_string(self, nspair=None):

    if ((not nspair) and self.c_ns_prefix):
        nspair = self.c_ns_prefix
    if nspair:
        self.register_prefix(nspair)
    return ElementTree.tostring(self._to_element_tree(), encoding='UTF-8')
