using System.Collections.Generic;
public static void Main()
var xml = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
var produtos = ProcessImport(xml);
foreach(var item in produtos){
Console.WriteLine(item.Comment);
private static List<Product> ProcessImport(string xml)
XDocument xDocument = XDocument.Parse(xml);
List<Product> products = xDocument.Descendants("product").Select
Id = Convert.ToInt32(p.Element("id").Value),
Name=p.Element("name").Value,
Quantity = Convert.ToInt32(p.Element("quantity").Value),
Price = Convert.ToDecimal(p.Element("price").Value),
Comment = p.Element("description").Element("comment").Value