есть мой ответ
XElement productCatalog =
new XElement("PRODUCTCATALOG",
from urun in db.TBLP1URUNs
select new XElement("PRODUCT",
new XElement("ID", urun.ID),
new XElement("D1", urun.MODEL),
new XElement("D2", urun.URUNACIKLAMA),
new XElement("L1", urun.TBLP1URUNKATEGORI.TREENAME),
new XElement("IMG", db.TBLP1URUNRESIMs.Where(p => p.URUN_ID == urun.ID).First().FILE_NAME),
new XElement("EAN", urun.STOKKODU),
new XElement("ATP", GetUrunStokById(urun.ID)),//STOKMIKTARI
new XElement("DM3", urun.DESI),
from ozellikler in urun.TBLP1OZELLIK_URUNs
select new XElement("S",
new XElement("L", ozellikler.TBLP1OZELLIK.TBLP1OZELLIKTIPI.TIPI),
new XElement("V", ozellikler.TBLP1OZELLIK.OZELLIK))
)
);