protected function mapXMLElementToEntity($xmlEntry, $entity, $stackEntity)
    {
        $stackEntity->push($entity);

        foreach ($xmlEntry->attributes() as $name => $attribut) {
            $value = $this->mapAttributValue($xmlEntry, $name, $attribut->__toString(), $stackEntity);

            $entityForAttribut = $this->getEntityForAttribut($entity, $xmlEntry, $name, $stackEntity);
            $property = $this->mapAttributToProperty($xmlEntry, $name, $stackEntity);
            $this->mapToPropertyAttribut($property, $value, $xmlEntry, $entityForAttribut, $stackEntity);
        }

        foreach ($xmlEntry->children() as $xmlChildEntry) {
            $name = $xmlChildEntry->getName();

            $value = $this->mapTagValue($xmlEntry, $name, $xmlChildEntry->__toString(), $stackEntity);

            $entityForTagName = $this->getEntityForTagName($entity, $xmlEntry, $name, $stackEntity);
            $property = $this->mapTagNameToProperty($xmlEntry, $name, $stackEntity);
            $this->mapToPropertyTagname($property, $value, $xmlChildEntry, $entityForTagName, $stackEntity);
        }

        $stackEntity->pop();
    }