finished implementing xml reader, untested