protected function createOutputContents()
    {
        $dom = $this->formatterInstance()
                    ->forge(
                        $this->rows,
                        $this->rootElementName,
                        $this->replaceSpacesByUnderScoresInKeyNames,
                        $this->versionOfXmlDeclaration,
                        $this->encodingOfXmlDeclaration
                    )->toDom();

        $dom->formatOutput = $this->formatOutput;

        return $dom->saveXML();
    }