You are here

function FrxReportGenerator::inner_xml in Forena Reports 7.3

Same name and namespace in other branches
  1. 6.2 FrxReportGenerator.inc \FrxReportGenerator::inner_xml()
  2. 7.2 FrxReportGenerator.inc \FrxReportGenerator::inner_xml()
  3. 7.4 FrxReportGenerator.inc \FrxReportGenerator::inner_xml()

Enter description here...

Parameters

simplexml $xml:

string $tag:

Return value

string

File

./FrxReportGenerator.inc, line 123
Common functions used throughout the project but loaded in this file to keep the module file lean.

Class

FrxReportGenerator

Code

function inner_xml($xml, $tag) {
  if (is_object($xml) && is_object($xml->{$tag})) {
    $xml_data = $xml->{$tag}
      ->asXML();
    $xml_data = preg_replace("/<\\/?" . $tag . "(.|\\s)*?>/", "", $xml_data);
  }
  return $xml_data;
}