Not a direct answer, but: for simple data exports on the admin side, I generally just use the AJAX API. Set up an AJAX handler for your export:
/**
* export from admin
*/
function wpse_126508_export() {
header('Content-Type: text/xml; charset=utf-8');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename=wpse_126508_export.xml');
$xml = new XMLWriter();
$xml->openURI('php://output');
$xml->startDocument('1.0', 'UTF-8');
$xml->startElement('wpse_126508_export');
// ... your details
$xml->endElement(); // wpse_126508_export
$xml->flush();
exit();
}
add_action('wp_ajax_wpse_126508_export', 'wpse_126508_export');
add_action('wp_ajax_nopriv_wpse_126508_export', 'wpse_126508_export');
Then output a link to it on your admin page:
$exportURL = add_query_arg(array(
'action' => 'wpse_126508_export',
'nc' => time(), // cache buster
), admin_url('admin-ajax.php'));
printf('<a href="https://wordpress.stackexchange.com/questions/126508/%s">export</a>', $exportURL);
Of course, you can equally submit a form to the AJAX endpoint if you need to post your request.