public function testXmlParser() { $parser = new XmlParser(); $data = $parser->parse($this->configPath("test1.xml")); // echo json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); }
/** * * @param string $path * @param type $status * @return type */ protected function loadXml($path, &$status = null) { $parser = new XmlParser(); try { $data = $parser->parse($path); $status = 0; } catch (\Exception $ex) { $status = 4; $this->addError($status, $ex->getMessage()); $data = []; } return $data; }