'Send an initial stream header.'

def StreamInit(self):

    self.Stream = simplexml.NodeBuilder()
    self.Stream._dispatch_depth = 2
    self.Stream.dispatch = self.dispatch
    self.Stream.stream_header_received = self._check_stream_start
    self._owner.debug_flags.append(simplexml.DBG_NODEBUILDER)
    self.Stream.DEBUG = self._owner.DEBUG
    self.Stream.features = None
    self._metastream = Node('stream:stream')
    self._metastream.setNamespace(self._owner.Namespace)
    self._metastream.setAttr('version', '1.0')
    self._metastream.setAttr('xmlns:stream', NS_STREAMS)
    self._metastream.setAttr('to', self._owner.Server)
    self._owner.send(("<?xml    version='1.0'?>%s>" % str(self._metastream)[:(-2)]))
