You are here

FrxXML.inc in Forena Reports 7.3

Same filename and directory in other branches
  1. 7.4 renderers/FrxXML.inc

FrxXML Just render the XML source data. Look at the FrxRender class to see a full list of properties that can be used here.

File

renderers/FrxXML.inc
View source
<?php

/**
 * @file FrxXML
 * Just render the XML source data.
 * Look at the FrxRender class to see a full list of
 * properties that can be used here.
 */
class FrxXML extends FrxRenderer {
  public function render() {
    $output = '';
    $node = $this->reportDocNode;
    $xml = FrxData::instance()
      ->currentContext();
    if ($xml && is_callable(array(
      $xml,
      'asXML',
    ))) {
      $dom = dom_import_simplexml($xml);
      $dom->ownerDocument->formatOutput = TRUE;
      $dom->ownerDocument->preserveWhiteSpace = TRUE;
      $output = $dom->ownerDocument
        ->saveXML($dom->ownerDocument->documentElement);
    }
    if ($this->format != 'xml') {
      $output = '<pre>' . htmlspecialchars($output) . '</pre>';
    }
    return $output;
  }

}

Classes

Namesort descending Description
FrxXML @file FrxXML Just render the XML source data. Look at the FrxRender class to see a full list of properties that can be used here.