rebuild XML functionality now working