We employ some results about continued fraction expansions of Herglotz-Nevanlinna functions to characterize the spectral data of generalized indefinite strings of Stieltjes type. In particular, this solves the corresponding inverse spectral problem through explicit formulas.