You are here

private function wsdata_simple_xml_processor::_parsexml in Web Service Data 7

1 call to wsdata_simple_xml_processor::_parsexml()
wsdata_simple_xml_processor::parse in ./wsdata_simple_xml.wsdata.processor.inc

File

./wsdata_simple_xml.wsdata.processor.inc, line 35

Class

wsdata_simple_xml_processor

Code

private function _parsexml($value) {
  if (is_object($value) and get_class($value)) {
    $value = get_object_vars($value);
    foreach ($value as $k => $v) {
      $value[$k] = $this
        ->_parsexml($v);
    }
  }
  elseif (is_array($value)) {
    foreach ($value as $key => $xml) {
      $value[$key] = $this
        ->_parsexml($xml);
    }
  }
  return $value;
}