'write the object data under the last alert element (or the root if no alert)
if a conn object recurse in by iterating
else write the string output of the object'

def write(self, obj, parent=None, **kwargs):

    if (not parent):
        parent = self.element
    kw = dict(**kwargs)
    tag = str(type(obj)).split("'", 2)[1]
    if tag.startswith('dshell.'):
        kw.update(**obj.info())
        tag = tag.split('dshell.')[1]
    e = ET.SubElement(parent, tag, self._filter_attr(kw))
    if (tag == 'Connection'):
        for blob in obj:
            self.write(blob, parent=e)
        return
    e.text = self._filter_text(str(obj))
