protected function unmarshall(DOMElement $element)
    {
        if (($source = $this->getDOMElementAttributeAs($element, 'sourceIdentifier', 'string')) !== null) {
            if (($target = $this->getDOMElementAttributeAs($element, 'targetIdentifier', 'string')) !== null) {
                try {
                    $object = new VariableMapping($source, $target);

                    return $object;
                } catch (InvalidArgumentException $e) {
                    $msg = "'targetIdentifier or/and 'sourceIdentifier' are not valid QTI Identifiers.";
                    throw new UnmarshallingException($msg, $element, $e);
                }
            } else {
                $msg = "The mandatory attribute 'targetIdentifier' is missing from element '" . $element->localName . "'.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "The mandatory attribute 'sourceIdentifier' is missing from element '" . $element->localName . "'.";
            throw new UnmarshallingException($msg, $element);
        }
    }