public void Foo() { var products = from u in XDoc.Descendants("product") select new C { Urunkod = u.Element("productId"), UrunAdi = u.Element("title"), }; }