using System.Collections.Generic;
public static void Main()
float majorItem2 = 22.6f;
string majorItem3 = "this string";
List<things> items = new List<things>();
things x1 = new things();
things x2 = new things();
things x3 = new things();
XDocument doc = new XDocument(
new XDeclaration("1.0", "utf=8", "true"),
new XElement("majorItem1", majorItem1),
new XElement("majorItem2", majorItem2),
new XElement("majorItem3", majorItem3),
select new XElement("item",
new XElement("item1", item.item1),
new XElement("item2", item.item2),
new XElement("item3", item.item3)
Console.WriteLine(doc.ToString());