How to output the menue structured for tabbed navigation?

What a pitty that nobody responded. I had a hard way checking the walker class first before I found out that it’ll be much easier with wp_get_nav_menu_items()

This is what I came up with. Not perfect but it works (only two levels which is enought for my page).

$menu_name="primary";

if ( (  $locations = get_nav_menu_locations()  ) && isset( $locations[ $menu_name ] ) ) 
{
    $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
    $menu_items = wp_get_nav_menu_items($menu->term_id);

foreach ( (array) $menu_items as $key => $menu_item ) 
{
    $title = $menu_item->title;
    $url = $menu_item->url;
    $curr_item_parent = $menu_item->menu_item_parent;
    $curr_item_id = $menu_item->db_id; 

    if($curr_item_parent)
    {
        $sub_list[$curr_item_parent][] = array('title' => $title, 'url' => $url, 'id' =>$curr_item_id, 'parent_id' => $curr_item_parent);
        $parent_list[] = $curr_item_parent;
    }
    else
    {
        $tab_list[] = array('title' => $title, 'url' => $url, 'id' =>$curr_item_id);
        $toplevel_list[] = $curr_item_id;
    }
        $complete_list[] = $curr_item_id;
    }
}

$parentless_list = array_diff ($toplevel_list, array_unique($parent_list)); 

var_dump($parentless_list);

$menu_output .="<ul class="nav nav-tabs">";

foreach($tab_list as $tab)
{
    $tab = (object)$tab;
    $menu_output .="<li class=""><a href="#{$tab->id}" data-toggle="tab">{$tab->title}</a></li>";
}

$menu_output .= "</ul>";
$menu_output .= "<div class="tab-content">";

    foreach($sub_list as $key=>$sub_array)
    {
        $menu_output .= "<div class="tab-pane" id='{$key}'>";

        foreach($sub_array as $sub)
        {
            $sub = (object)$sub;
            $menu_output .="<li class=""><a href="#{$sub->url}" data-toggle="tab">{$sub->title}</a></li>";
        }

        $menu_output .= "</div>";

    foreach($parentless_list as $dummy_item)
    {
        $menu_output .= "<div class="tab-pane" id='{$dummy_item}'></div>";
    }

}

$menu_output .= "</div>";

echo $menu_output;

tech