1 2 3 4 5 6 7 8
XDocument doc = new XDocument ( new XDeclaration ( "1.0", "utf8", "yes" ), new XElement ( "Fields", fieldList.Select ( x => new XElement ( "Field", new XAttribute("name", x.Replace ( "\"", "" ))) )));