/**
  * Save a SimpleXMLElement as XML file.
  *
  * @param string           $fileName The filename of XML file
  * @param SimpleXMLElement $resource The XML resource
  *
  * @return void
  */
 public function saveXML($fileName, SimpleXMLElement $resource)
 {
     $domSXE = dom_import_simplexml($resource);
     $dom = new DOMDocument('1.0');
     $dom->appendChild($dom->importNode($domSXE, true));
     $dom->formatOutput = true;
     $this->cbFDHandler->createFile($fileName, $dom->saveXML());
 }
 /**
  * Save rendered file to output directory
  * 
  * @param array  $data     Dataset information used for rendering
  * @param string $fileName The filename of analyzed file
  * 
  * @return void
  * @see cbFDHandler::createFile
  */
 private function _generateView($data, $fileName)
 {
     $this->_cbFDHandler->createFile($this->_outputDir . DIRECTORY_SEPARATOR . $fileName, $this->_render('page', $data));
 }