private function addChildNode(string $name, array $config, \XMLWriter $writer): void
    {
        $writer->startElement($name);

        foreach ($config as $nodeName => $nodeData) {
            $nodeName = \is_numeric($nodeName) ? 'num__'.$nodeName : $nodeName;

            if (\is_array($nodeData)) {
                $this->addChildNode($nodeName, $nodeData, $writer);
            } elseif (\is_bool($nodeData)) {
                $writer->writeElement($nodeName, $nodeData === true ? 'true' : 'false');
            } else {
                $writer->writeElement($nodeName, (string)$nodeData);
            }
        }

        $writer->endElement();
    }