diff --git a/core/modules/rest/src/Plugin/views/style/Serializer.php b/core/modules/rest/src/Plugin/views/style/Serializer.php
index 7e9b4331ef..c42f9bd545 100644
--- a/core/modules/rest/src/Plugin/views/style/Serializer.php
+++ b/core/modules/rest/src/Plugin/views/style/Serializer.php
@@ -199,6 +199,12 @@ public function calculateDependencies() {
    */
   protected function getFormatOptions() {
     $formats = array_keys($this->formatProviders);
+
+    // Add XML to the list of formats. It has been deprecated in Drupal 8.3.x
+    // and will be removed in Drupal 9. However, it must continue to work for
+    // REST Exports.
+    $formats[] = 'xml';
+
     return array_combine($formats, $formats);
   }
 
diff --git a/core/modules/rest/tests/modules/rest_test/rest_test.services.yml b/core/modules/rest/tests/modules/rest_test/rest_test.services.yml
new file mode 100644
index 0000000000..87e47e8f77
--- /dev/null
+++ b/core/modules/rest/tests/modules/rest_test/rest_test.services.yml
@@ -0,0 +1,5 @@
+services:
+  serializer.encoder.foobar:
+    class: Drupal\serialization\Encoder\JsonEncoder
+    tags:
+      - { name: encoder, format: foobar }
diff --git a/core/modules/rest/tests/modules/rest_test/src/RestTestServiceProvider.php b/core/modules/rest/tests/modules/rest_test/src/RestTestServiceProvider.php
new file mode 100644
index 0000000000..7d3aeb41b7
--- /dev/null
+++ b/core/modules/rest/tests/modules/rest_test/src/RestTestServiceProvider.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\rest_test;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+
+/**
+ * Adds "foobar" as known format.
+ */
+class RestTestServiceProvider implements ServiceModifierInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    if ($container->has('http_middleware.negotiation') && is_a($container->getDefinition('http_middleware.negotiation')->getClass(), '\Drupal\Core\StackMiddleware\NegotiationMiddleware', TRUE)) {
+      $container->getDefinition('http_middleware.negotiation')->addMethodCall('registerFormat', ['foobar', ['text/foobar']]);
+    }
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index 973f5b9753..f2ed502045 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -601,7 +601,7 @@ public function testPost() {
     $this->assertAuthenticationEdgeCases('POST', $url, $request_options);
 
 
-    $request_options[RequestOptions::HEADERS]['Content-Type'] = 'text/xml';
+    $request_options[RequestOptions::HEADERS]['Content-Type'] = 'text/foobar';
 
 
     // DX: 415 when request body in existing but not allowed format.
@@ -809,7 +809,7 @@ public function testPatch() {
     $this->assertAuthenticationEdgeCases('PATCH', $url, $request_options);
 
 
-    $request_options[RequestOptions::HEADERS]['Content-Type'] = 'text/xml';
+    $request_options[RequestOptions::HEADERS]['Content-Type'] = 'text/foobar';
 
 
     // DX: 415 when request body in existing but not allowed format.
diff --git a/core/modules/serialization/serialization.info.yml b/core/modules/serialization/serialization.info.yml
index 7c4eb52313..9e59558ad2 100644
--- a/core/modules/serialization/serialization.info.yml
+++ b/core/modules/serialization/serialization.info.yml
@@ -1,6 +1,6 @@
 name: Serialization
 type: module
-description: Provides a service for (de)serializing data to/from formats such as JSON and XML
+description: Provides a service for (de)serializing data to/from formats such as JSON
 package: Web services
 version: VERSION
 core: 8.x
diff --git a/core/modules/serialization/serialization.module b/core/modules/serialization/serialization.module
index 39c5fbfa08..b593ee9b4b 100644
--- a/core/modules/serialization/serialization.module
+++ b/core/modules/serialization/serialization.module
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Provides a service for (de)serializing data to/from formats such as JSON and XML.
+ * Provides a service for (de)serializing data to/from formats such as JSON.
  */
 
 use Drupal\Core\Routing\RouteMatchInterface;
@@ -15,7 +15,7 @@ function serialization_help($route_name, RouteMatchInterface $route_match) {
     case 'help.page.serialization':
       $output = '';
       $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The Serialization module provides a service for serializing and deserializing data to and from formats such as JSON and XML.') . '</p>';
+      $output .= '<p>' . t('The Serialization module provides a service for serializing and deserializing data to and from formats such as JSON.') . '</p>';
       $output .= '<p>' . t('Serialization is the process of converting data structures like arrays and objects into a string. This allows the data to be represented in a way that is easy to exchange and store (for example, for transmission over the Internet or for storage in a local file system). These representations can then be deserialized to get back to the original data structures.') . '</p>';
       $output .= '<p>' . t('The serializer splits this process into two parts. Normalization converts an object to a normalized array structure. Encoding takes that array and converts it to a string.') . '</p>';
       $output .= '<p>' . t('This module does not have a user interface. It is used by other modules which need to serialize data, such as <a href=":rest">REST</a>.', array(':rest' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '</p>';
diff --git a/core/modules/serialization/serialization.services.yml b/core/modules/serialization/serialization.services.yml
index 8b570c0763..6810831f7a 100644
--- a/core/modules/serialization/serialization.services.yml
+++ b/core/modules/serialization/serialization.services.yml
@@ -52,7 +52,10 @@ services:
   serializer.encoder.xml:
     class: Drupal\serialization\Encoder\XmlEncoder
     tags:
-      - { name: encoder, format: xml }
+    # The XML 'format' attribute has been removed as XML encoding is unsupported
+    # in Drupal 8.3.x.
+    # @see \Drupal\serialization\Encoder\XmlEncoder
+    - { name: encoder }
   serializer.entity_resolver:
     class: Drupal\serialization\EntityResolver\ChainEntityResolver
   serializer.entity_resolver.uuid:
diff --git a/core/modules/serialization/src/Encoder/XmlEncoder.php b/core/modules/serialization/src/Encoder/XmlEncoder.php
index abd78968a3..f5456d4b0e 100644
--- a/core/modules/serialization/src/Encoder/XmlEncoder.php
+++ b/core/modules/serialization/src/Encoder/XmlEncoder.php
@@ -11,6 +11,9 @@
  *
  * This acts as a wrapper class for Symfony's XmlEncoder so that it is not
  * implementing NormalizationAwareInterface, and can be normalized externally.
+ *
+ * @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This
+ *   exists solely for BC, for classes extending this.
  */
 class XmlEncoder implements EncoderInterface, DecoderInterface {
 
diff --git a/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php b/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php
index f4611f3fc1..bc543cdcb5 100644
--- a/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php
+++ b/core/modules/serialization/src/RegisterSerializationClassesCompilerPass.php
@@ -42,6 +42,10 @@ public function process(ContainerBuilder $container) {
     $formats = array();
     $format_providers = [];
     foreach ($container->findTaggedServiceIds('encoder') as $service_id => $attributes) {
+      if (!isset($attributes[0]['format'])) {
+        continue;
+      }
+
       $format = $attributes[0]['format'];
       $formats[] = $format;
 
diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
index 29b97277c0..5616f9017f 100644
--- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
+++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
@@ -9,7 +9,6 @@
 use GuzzleHttp\Cookie\CookieJar;
 use Psr\Http\Message\ResponseInterface;
 use Symfony\Component\Serializer\Encoder\JsonEncoder;
-use Symfony\Component\Serializer\Encoder\XmlEncoder;
 use Drupal\hal\Encoder\JsonEncoder as HALJsonEncoder;
 use Symfony\Component\Serializer\Serializer;
 
@@ -47,7 +46,7 @@ class UserLoginHttpTest extends BrowserTestBase {
   protected function setUp() {
     parent::setUp();
     $this->cookies = new CookieJar();
-    $encoders = [new JsonEncoder(), new XmlEncoder(), new HALJsonEncoder()];
+    $encoders = [new JsonEncoder(), new HALJsonEncoder()];
     $this->serializer = new Serializer([], $encoders);
   }
 
@@ -98,7 +97,7 @@ public function testLogin() {
         /** @var \Drupal\Core\Extension\ModuleInstaller $module_installer */
         $module_installer = $this->container->get('module_installer');
         $module_installer->install(['serialization']);
-        $formats = ['json', 'xml', 'hal_json'];
+        $formats = ['json', 'hal_json'];
       }
       else {
         // Without the serialization module only JSON is supported.
