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);
        }
    }
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);
        }
    }
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 ) ; } }
Unmarshall a DOMElement object corresponding to a QTI variableMapping element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A VariableMapping object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException If the mandatory attributes 'sourceIdentifier' or 'targetIdentifier' are missing from $element or are invalid.
Unmarshall a DOMElement object corresponding to a QTI variableMapping element .