private function addCollectionNode(DOMDocument $document, $element, $value): void
    {
        if ($element->childNodes->length === 0 && $element->attributes->length === 0) {
            $this->convertElement($document, $element, $value);
        }

        $child = $element->cloneNode();

        $element->parentNode->appendChild($child);

        $this->convertElement($document, $child, $value);
    }