src/Viserio/Component/Parser/Dumper/XmlDumper.php
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);
    }
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);
    }
Add collection node.

@param \DOMDocument         $document
@param \DOMElement|\DOMNode $element
@param string|string[]      $value

@throws \DOMException

@return void