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);
        }
    }