Which of the following is a general method of preparing acids?