protected function xmlElementToClassname(SimpleXMLElement $xmlElement)
    {
        $xpath = $xmlElement->getName();
        $parent = $xmlElement;
        while ($parent = current($parent->xpath('parent::*'))) {
            $xpath = $parent->getName() . '/' . $xpath;
        }

        foreach ($this->objectMapper as $key => $classname) {
            if (false !== strpos($xpath, $key) && $this->strEndsWith($xpath, $key)) {
                return $classname;
            }
        }
        return null;
    }