general purpose xml reader