You are here

function XMLArrayInstance::XMLArrayInstance in Campaign Monitor 5.2

*

Parameters

string $root An absolute path that points to where XML data: * should start being converted to an array. Do not add an ending '/'.

File

lib/CMBase.php, line 597

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 XMLArrayInstance($root = null) {
  if ($root != null && $root != '/') {
    $this->root = $root;
    $this->rootStart = substr_count($root, '/');
    $this->stack_prefix = $root . '/';
  }
}