I get this error "Object reference not set to an instance of object error" when I execute this piece of code
xe.Element("Product") // Select the Product desc="household" element
.Elements()
.Select(element =>
new { Name=(string) element.Attribute("desc"),
Count=element.Elements().Count() });
What could be the reason?