def fromXml( parent, xml, actions = None ):
        """
        Generates an XMenu from the inputed xml data and returns the resulting \
        menu.  If no action dictionary is supplied, it will be generated based \
        on the parents actions.
        
        :param      parent      | <QWidget>
                    xml         | <xml.etree.ElementTree.Element>
                    actions     | {<str> name: <QAction>, } || None
        
        :return     <XMenu> || None
        """
        # generate the actions off the parent
        if ( actions is None ):
            actions = {}
            for action in parent.actions():
                key = nativestring(action.objectName())
                if not key:
                    key = nativestring(action.text())
                
                if not key:
                    continue
                
                actions[key] = action
        
        # create a new menu
        menu = XMenu(parent)
        menu.setIcon(QIcon(resources.find('img/folder.png')))
        menu.setTitle(xml.get('title', '')) 
        
        for xaction in xml:
            if xaction.tag == 'separator':
                menu.addSeparator()
            elif xaction.tag == 'menu':
                menu.addMenu(XMenu.fromXml(menu, xaction, actions))
            else:
                action = actions.get(xaction.get('name', ''))
                if action:
                    menu.addAction(action)
        
        return menu