public function output($download = false) { $dom = new \DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->loadXML($this->resource->asXML()); $this->output = $dom->saveXML(); parent::output($download); }