'Flush internal buffers.'

def _flush(self, indent=True, wrap=False):

    if self._open:
        if indent:
            self.write(u'>\n')
        else:
            self.write(u'>')
        self._open = 0
    if self._data:
        data = u''.join(self._data)
        if wrap:
            indent = self.get_indentation_spaces(1)
            data = textwrap.fill(data, initial_indent=indent, subsequent_indent=indent)
            self.write(u'\n')
            self.write(self.xml_escape_cdata(data))
            self.write(u'\n')
            self.write(self.get_indentation_spaces())
        else:
            self.write(self.xml_escape_cdata(data))
        self._data = []
