You are here

function forena_inner_xml in Forena Reports 7.2

Same name and namespace in other branches
  1. 6.2 forena.common.inc \forena_inner_xml()
  2. 6 forena.common.inc \forena_inner_xml()
  3. 7.5 forena.common.inc \forena_inner_xml()
  4. 7 forena.common.inc \forena_inner_xml()
  5. 7.3 forena.common.inc \forena_inner_xml()
  6. 7.4 forena.common.inc \forena_inner_xml()

Enter description here...

Parameters

simplexml $xml:

string $tag:

Return value

string

1 call to forena_inner_xml()
forena_data_block_add in ./forena.admin.inc
submit handler for forena_data_block_form. This adds the datablock to an existing report.

File

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

Code

function forena_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;
}