'Save the stream ID once the streams have been established.
:param xml: The incoming stream\'s root element.'

def start_stream_handler(self, xml):

    self.stream_id = xml.get(u'id', u'')
    self.stream_version = xml.get(u'version', u'')
    self.peer_default_lang = xml.get((u'{%s}lang' % XML_NS), None)
    if ((not self.is_component) and (not self.stream_version)):
        log.warning(u'Legacy    XMPP    0.9    protocol    detected.')
        self.event(u'legacy_protocol')
