function XMLArrayInstance::data in Campaign Monitor 5.2
File
- lib/
CMBase.php, line 624
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 data($parser, $data) {
$data = trim($data);
// if $data is empty or we're not within start path, skip
if (strpos($this->stack_path, $this->root) !== 0 || $data == '') {
return;
}
// delay inserting the data, because the parser handles entities as a
// separate call. that meant that before buffering data, a simple text node
// would be broken up into multiple parts because of the entities.
$this->data_buffer[$this->stack_path] .= $data;
}