You are here

function XMLArrayInstance::start in Campaign Monitor 5.2

File

lib/CMBase.php, line 611

Class

XMLArrayInstance
XMLArrayInstance, xml2array() and array2xml() will be used to convert data between XML and Array. We're using a class because that is the only way we can safely use xml_parse() and other related functions (the alternative is to use $GLOBALS to…

Code

function start($parser, $ele, $atts) {
  $this->stack[] = $ele;
  $this->stack_path = '/' . implode('/', $this->stack);
  $this->stack_sz++;
  if (!isset($this->stack_count[$this->stack_path])) {
    $this->stack_count[$this->stack_path] = -1;
  }
  $this->stack_count[$this->stack_path]++;
  $this->data_buffer[$this->stack_path] = '';
}