For security reasons, WordPress does not allow to upload XML files into the media library, by default. To alleviate this limitation, you have to add the following PHP code to functions.php in your current theme.

In my setup, the path to this file is [WORDPRESS_ROOT]/wp-content/themes/[MY_THEME]/functions.php.

Thanks to Ernie Leseberg for writing about this solution.