humm, actually I don't get the issue: I'm trying this:

```php

require __DIR__ . '/vendor/autoload.php';

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\Loader\Loader;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Dumper\XmlDumper;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\Config\FileLocator;

$file = __DIR__ . '/generated.xml';

$container = new ContainerBuilder();
$loader = new XmlFileLoader($container, new FileLocator(__DIR__));
$loader->load('services.xml');
$container->compile();

$dumper = new XmlDumper($container);
file_put_contents($file, $dumper->dump());

$container2 = new ContainerBuilder();
$loader = new XmlFileLoader($container2, new FileLocator(__DIR__));
$loader->load($file);
$container2->compile();
```

with sevices.xml:
```xml
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  <services>
    <service id="decorated" class="stdClass" />
    <service id="decorator_service" class="stdClass" decorates="decorated" />
    <service id="decorator_service_with_name" class="stdClass" decorates="decorated" decoration-inner-name="decorated.pif-pouf"/>
  </services>
</container>
```

that generates:
```xml
<?xml version="1.0" encoding="utf-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  <services>
    <service id="decorator_service" class="stdClass" decorates="decorated"/>
    <service id="decorator_service_with_name" class="stdClass" decorates="decorated" decoration-inner-name="decorated.pif-pouf"/>
    <service id="decorated" alias="decorator_service_with_name"/>
  </services>
</container>
```