XML-based FSM Engine