ProcessBatchData Helper Class
There are a few ways to add multiple rows to a SharePoint list. The iterative approach (i.e.: line by line) is simple, but this pattern will fail a CAF report. The better way to get the data up is loading a batch file using the ProcessBatchData method on your trusty SPWeb object. (The official blurb on the method is here .) The problem with this is that is requires a well formatted XML string. The easiest way to accomplish this is to writer a helper class and it is quite a life saver. Here is the class, followed by a sample of how to use the code. public class ProcessBatchDataHelper { private const string ProcessBatchStartXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; private const string ProcessBatchRowsStartXml = "<ows:Batch OnError=\"Continue\">"; private const string ProcessBatchEndXml = @"</ows:Batch>"; ...