public function getSource(): string
    {
        if (null === $this->source) {
            // pass the document element to avoid xml header
            $this->source = $this->document->saveXML($this->document->documentElement);
        }
        return $this->source;
    }