gather data for xml write