public function asDom(): \DOMDocument
    {
        $doc = new \DOMDocument();
        $doc->loadXML($this->writer->outputMemory());
        return $doc;
    }
public function asDom(): \DOMDocument
    {
        $doc = new \DOMDocument();
        $doc->loadXML($this->writer->outputMemory());
        return $doc;
    }
public function asDom ( ) : \ DOMDocument { $ doc = new \ DOMDocument ( ) ; $ doc -> loadXML ( $ this -> writer -> outputMemory ( ) ) ; return $ doc ; }
Return the XML as a DOM

@return  \DOMDocument
Return the XML as a DOM