public function parse(&$data)
{
$this->document = [];
$this->stack = [];
$this->parent = &$this->document;
// Ersetzen von bestimmten Zeichen
$map = array(
'–' => '-',
'„' => '"',
'“' => '"',
'”' => '"',
'’' => '´',
'‹' => '"',
'›' => '"',
);
$data = strtr($data,$map);
return xml_parse($this->parser, $data, true) ? $this->document : null;
}