'@return: Manifest instance as ROS XML manifest
@rtype: str'

def xml(self):

    if (not self.brief):
        desc = ('        <description>%s</description>' % self.description)
    else:
        desc = ('        <description    brief="%s">%s</description>' % (self.brief, self.description))
    author = ('        <author>%s</author>' % self.author)
    if self.license_url:
        license = ('        <license    url="%s">%s</license>' % (self.license_url, self.license))
    else:
        license = ('        <license>%s</license>' % self.license)
    versioncontrol = url = logo = exports = version = ''
    if self.url:
        url = ('        <url>%s</url>' % self.url)
    if self.version:
        version = ('        <version>%s</version>' % self.version)
    if self.logo:
        logo = ('        <logo>%s</logo>' % self.logo)
    depends = '\n'.join([('        %s' % d.xml()) for d in self.depends])
    rosdeps = '\n'.join([('        %s' % rd.xml()) for rd in self.rosdeps])
    platforms = '\n'.join([('        %s' % p.xml()) for p in self.platforms])
    if self.exports:
        exports = (('        <export>\n' + '\n'.join([('        %s' % e.xml()) for e in self.exports])) + '        </export>')
    if self.versioncontrol:
        versioncontrol = ('        %s' % self.versioncontrol.xml())
    if (self.status or self.notes):
        review = ('        <review    status="%s"    notes="%s"    />' % (self.status, self.notes))
    fields = filter((lambda x: x), [desc, author, license, review, url, logo, depends, rosdeps, platforms, exports, versioncontrol, version])
    return ((('<%s>\n' % self._type) + '\n'.join(fields)) + ('\n</%s>' % self._type))
