Here is a sample
string[] islandtoBase64String = { "sfsgsdg", "sgtyeyewy", "rhjfjgfjkgfj", "fgjgfjgfjgfj" };
string[] names = { "AAA", "BBB", "CCC","DDD" };
XmlDocument doc = new XmlDocument();
XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
doc.AppendChild(docNode);
XmlNode productsNode = doc.CreateElement("products");
doc.AppendChild(productsNode);
int cnt = 0;
foreach (string s in names)
{
XmlNode productNode = doc.CreateElement("island");
productsNode.AppendChild(productNode);
XmlNode nameNode = doc.CreateElement("Name");
nameNode.AppendChild(doc.CreateTextNode(s));
productNode.AppendChild(nameNode);
XmlNode priceNode = doc.CreateElement("data");
priceNode.AppendChild(doc.CreateTextNode(islandtoBase64String[cnt++]));
productNode.AppendChild(priceNode);
}
doc.Save(@"D:\test.xml");
Make changes as per your requirement