Simply iterate through the data, adding each data element into a new child. It's easy!
What does your code look like? Where are you having the problem? Can you get it to work without using an Ajax call? What is the complexity or problem that Ajax has introduced that wasn't there when you weren't doing an Ajax call?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com