Create route that returns XML Feed
Can you give more details ?

For example for an aggregator RSS : 

In your test.routing.yml :

test.rss:
  path: '/rss'
  defaults:
    _title: 'rss'
    _controller: '\Drupal\test\Controller\RssController::content'
  requirements:
    _access_test: 'test'


And in your controller :

&lt;?php

namespace Drupal\test\Controller;

use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Response;

class RssController extends ControllerBase
{
    public function content()
    {
        $response = new Response();
        $response-&gt;setContent('&lt;?xml&gt; My flux &lt;/xml&gt;');
       // kint($response);
        return $response;

    }

}



  You need the HttpFoundation\Response component.