Export Table Data in XML through AIF Document Services

Your code does what you tell it to do. You could add more records one by one, but you should rather look at AifSendService::submitFromQuery().