using (Stream str = new FileStream(FilePath, FileMode.Open))
{
XElement xe0 = XElement.Load(str);
foreach (var xe1 in xe0.Descendants("Products").Elements())
{
var p = new Products
{
SysId = xe1.Attribute("Sys_Oid").Value,
Mainproduct = xe1.Name.ToString(),
Name = xe1.Attribute("Name").Value,
Visible = xe1.Descendants("ProductVisibility").FirstOrDefault().Attribute("Visible").Value,