On the inverse spectral theory of Schrödinger and Dirac operators