def inlineRoot(doc):
    """ make the root attribute inline
    @param root_node: minidom's Document compatible class
    @return: plain XML
    """
    root_elt = doc.documentElement
    if root_elt.hasAttribute('style'):
        styles_raw = root_elt.getAttribute('style')
        styles = styles_raw.split(';')
        new_styles = []
        for style in styles:
            try:
                key, value = style.split(':')
            except ValueError:
                continue
            if key.strip().lower() == 'display':
                value = 'inline'
            new_styles.append('%s: %s' % (key.strip(), value.strip()))
        root_elt.setAttribute('style', '; '.join(new_styles))
    else:
        root_elt.setAttribute('style', 'display: inline')
    return root_elt.toxml()
