I\'m trying to write to an XML document, taking data from an ArrayList of lists
for (int i = 0; i < 15; i++) { string headname
An XML document will have a root element ie one that includes all other elements. You don't have one
Your doc is like
An XML doc is like
You need to WriteStartElement and WriteEndElement around your loop