'@return: export instance represented as manifest XML
@rtype: str'

def xml(self):

    attrs = '    '.join([('    %s="%s"' % (k, v)) for (k, v) in self.attrs.items()])
    if self.str:
        return ('<%s%s>%s</%s>' % (self.tag, attrs, self.str, self.tag))
    else:
        return ('<%s%s    />' % (self.tag, attrs))
