public static function buildResponseRule( SimpleXMLElement $data)
    {
        $returnValue = null;

	    switch ($data->getName()) {
			case 'exitResponse' : $returnValue = new ExitResponse();
				break;
			case 'setOutcomeValue' :
				$identifier = (string)$data['identifier'];
				$children = array();
				foreach ($data->children() as $child){
					$children[] = $child;
				}
				$expression = ExpressionParserFactory::build(array_shift($children));
				$returnValue = new SetOutcomeVariable($identifier, $expression);
				break;
			case 'responseCondition' :
				$returnValue = self::buildResponseCondition($data);
				break;
			default :
				throw new ParsingException('unknwown element '.$data->getName().' in ResponseProcessing');
		}

        return $returnValue;
    }