fixing the code for xml