protected function unmarshall(DOMElement $element)
    {
        $expressionElt = self::getFirstChildElement($element);

        try {
            return new TemplateConstraint($this->getMarshallerFactory()->createMarshaller($expressionElt)->unmarshall($expressionElt));
        } catch (InvalidArgumentException $e) {
            $msg = "A 'templateConstraint' element must contain an 'expression' element, '" . $expressionElt->localName . "' given.";
            throw new UnmarshallingException($msg, $element);
        }

        return new TemplateConstraint($expressions);
    }
protected function unmarshall(DOMElement $element)
    {
        $expressionElt = self::getFirstChildElement($element);

        try {
            return new TemplateConstraint($this->getMarshallerFactory()->createMarshaller($expressionElt)->unmarshall($expressionElt));
        } catch (InvalidArgumentException $e) {
            $msg = "A 'templateConstraint' element must contain an 'expression' element, '" . $expressionElt->localName . "' given.";
            throw new UnmarshallingException($msg, $element);
        }

        return new TemplateConstraint($expressions);
    }
protected function unmarshall ( DOMElement $ element ) { $ expressionElt = self :: getFirstChildElement ( $ element ) ; try { return new TemplateConstraint ( $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ expressionElt ) -> unmarshall ( $ expressionElt ) ) ; } catch ( InvalidArgumentException $ e ) { $ msg = "A 'templateConstraint' element must contain an 'expression' element, '" . $ expressionElt -> localName . "' given." ; throw new UnmarshallingException ( $ msg , $ element ) ; } return new TemplateConstraint ( $ expressions ) ; }
Unmarshall a DOMElement object corresponding to a QTI templateConstraint element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A TemplateConstraint object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException
Unmarshall a DOMElement object corresponding to a QTI templateConstraint element .