protected function unmarshall(DOMElement $element)
    {
        $childrenTagNames = array('exitTemplate', 'setCorrectResponse', 'setDefaultValue', 'setTemplateValue', 'templateCondition', 'templateConstraint');
        $templateRuleElts = $this->getChildElementsByTagName($element, $childrenTagNames);
        $templateRules = new TemplateRuleCollection();

        foreach ($templateRuleElts as $templateRuleElt) {
            $templateRules[] = $this->getMarshallerFactory()->createMarshaller($templateRuleElt)->unmarshall($templateRuleElt);
        }

        try {
            return new TemplateProcessing($templateRules);
        } catch (InvalidArgumentException $e) {
            $msg = "A 'templateProcessing' element must contain at least one 'templateRule' element, none given.";
            throw new UnmarshallingException($msg, $element, $e);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        $childrenTagNames = array('exitTemplate', 'setCorrectResponse', 'setDefaultValue', 'setTemplateValue', 'templateCondition', 'templateConstraint');
        $templateRuleElts = $this->getChildElementsByTagName($element, $childrenTagNames);
        $templateRules = new TemplateRuleCollection();

        foreach ($templateRuleElts as $templateRuleElt) {
            $templateRules[] = $this->getMarshallerFactory()->createMarshaller($templateRuleElt)->unmarshall($templateRuleElt);
        }

        try {
            return new TemplateProcessing($templateRules);
        } catch (InvalidArgumentException $e) {
            $msg = "A 'templateProcessing' element must contain at least one 'templateRule' element, none given.";
            throw new UnmarshallingException($msg, $element, $e);
        }
    }
protected function unmarshall ( DOMElement $ element ) { $ childrenTagNames = array ( 'exitTemplate' , 'setCorrectResponse' , 'setDefaultValue' , 'setTemplateValue' , 'templateCondition' , 'templateConstraint' ) ; $ templateRuleElts = $ this -> getChildElementsByTagName ( $ element , $ childrenTagNames ) ; $ templateRules = new TemplateRuleCollection ( ) ; foreach ( $ templateRuleElts as $ templateRuleElt ) { $ templateRules [ ] = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ templateRuleElt ) -> unmarshall ( $ templateRuleElt ) ; } try { return new TemplateProcessing ( $ templateRules ) ; } catch ( InvalidArgumentException $ e ) { $ msg = "A 'templateProcessing' element must contain at least one 'templateRule' element, none given." ; throw new UnmarshallingException ( $ msg , $ element , $ e ) ; } }
Unmarshall a DOMElement object corresponding to a QTI templateProcessing element.

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