public function parse($payload)
{
if ($payload) {
try {
$xml = simplexml_load_string($payload, 'SimpleXMLElement', LIBXML_VERSION >= 20700 ? LIBXML_PARSEHUGE | LIBXML_NOCDATA : LIBXML_NOCDATA);
$ns = ['' => null] + $xml->getDocNamespaces(true);
return $this->recursive_parse($xml, $ns);
} catch (\Exception $ex) {
throw new ParserException('Failed To Parse XML');
}
}
return [];
}