Added duration and rest elements to generated xml