public function importStreamWriter(XmlStreamWriter $writer): XmlStreamWriter
    {
        return $this->append(
                function(\DOMNode $parent) use ($writer)
                {
                    $parent->appendChild($this->doc->importNode(
                            $writer->asDom()->documentElement,
                            true
                    ));
                },
                'imported nodes'
        );
    }