Используйте Linq to XML, чтобы выбрать узел / атрибут, а затем добавить в SharePoint с помощью CSOM.
XElement xmlFile = XElement.Load(@"C:\Lee\SiteData.xml");
var data = from item in xmlFile.Descendants("Site")
select new
{
ID = item.Element("Url").Value,
Title = item.Element("Title").Value,
WebTemplateTitle= item.Element("WebTemplateTitle").Value
//more
};
using (var context = new ClientContext("https://tenant.sharepoint.com/sites/Developer"))
{
Console.ForegroundColor = ConsoleColor.Green;
string password = "password";
SecureString sec_pass = new SecureString();
Array.ForEach(password.ToArray(), sec_pass.AppendChar);
sec_pass.MakeReadOnly();
context.Credentials = new SharePointOnlineCredentials("lee@tenant.onmicrosoft.com", sec_pass);
SP.List oList = context.Web.Lists.GetByTitle("listtitle");
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
ListItem oListItem = oList.AddItem(itemCreateInfo);
oListItem["Title"] = data.Title;
oListItem.Update();
context.ExecuteQuery();
}