Clear xml by actions and send data as json