prefix = ''; $this->ns = ''; } public function hydrate($str) { $sxObject = simplexml_load_string( $str, '\SimpleXMLElement', 0, $this->prefix, ((empty($this->prefix)) ? false : true) ); if ($sxObject === false) { throw new \Exception('Unable to parse XML'); } return $sxObject; } public function registerNamespace($prefix, $ns) { $this->prefix = $prefix; $this->ns = $ns; } public function registerEntriesNamespace($useLavoisierXMLNS = true) { $this->registerNamespace('e', Entries::getXMLNS($useLavoisierXMLNS)); } }