'Send data over the stream.
This overrides L{xmlstream.XmlStream.send} to use the default namespace
of the stream header when serializing L{domish.IElement}s. It is
assumed that if you pass an object that provides L{domish.IElement},
it represents a direct child of the stream\'s root element.'

def send(self, obj):

    if domish.IElement.providedBy(obj):
        obj = obj.toXml(prefixes=self.prefixes, defaultUri=self.namespace, prefixesInScope=list(self.prefixes.values()))
    xmlstream.XmlStream.send(self, obj)
