OK, I found some example of yours in the forum and added this code just after copying the datasource to Main:
XPathNavigator dateNode = xNavMainDataSource.SelectSingleNode("/my:myFields/my:Meetings/my:Meeting/my:DateTo", NamespaceManager);
dateNode.CreateAttribute("xsi", "nil", NamespaceManager.LookupNamespace("xsi"), "true");
But that only adds the attribute to the first record in my repeating group. How do I add it to all records (Meetings)?
UPDATE:
I also notice in this post that you said the node must be blank before adding the nil attribute. That will defeat my whole purpose of copying the values from a 2nd data source. Is there a way around this?