Added a lot of xml processing code for the rota API