protected function getDomDocument()
    {
        if(null === $this->domDocument)
        {
            $this->domDocument = new \DOMDocument($this->getVersion(), $this->getEncoding());
            $this->domDocument->formatOutput = $this->formatOutputFlag;
        }

        return $this->domDocument;
    }