# Wie kann ich eine XML schreiben und diese als config.xml nutzen?

**URL:** https://forum.shopware.com/t/wie-kann-ich-eine-xml-schreiben-und-diese-als-config-xml-nutzen/61469
**Category:** Programmierung
**Created:** [2. September 2019 um 12:03 UTC](https://forum.shopware.com/t/wie-kann-ich-eine-xml-schreiben-und-diese-als-config-xml-nutzen/61469 "2019-09-02T12:03:03Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![experthing](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@experthing](https://forum.shopware.com/u/experthing)
#### Post date: [18. Mai 2020 um 11:42 UTC](https://forum.shopware.com/t/wie-kann-ich-eine-xml-schreiben-und-diese-als-config-xml-nutzen/61469/6 "2020-05-18T11:42:53Z")

</div>

@shopnoob85‍ Falls du noch auf der Suche bist, hier ist die passende Lösung für dich.

Lege zunächst deine XML File über den Shopware eigenen File Service an. Du findest deine Datei dann im **Root/files/your\_dir**

**Das geht mit:&nbsp;**

```
$fileService = $this->container->get("shopware.filesystem.private");

```

**Erstelle dann einen ordner im im Shopware Shop/files Verzeichnis:**

```
$fileSystem->createDir("dir_name");

```

**Erstelle dann deinen XML in dem Ordner:**

```
$fileSystem->write("dir_name/config.xml", $yourXmlFileContent);

```

**Das wars!&nbsp;**

VG, dein Experthing Team

---

_[View the full topic](https://forum.shopware.com/t/wie-kann-ich-eine-xml-schreiben-und-diese-als-config-xml-nutzen/61469)._
