Parse different document formats into a Ruby structure that can then be walked