build survey from xml