public virtual void ReadFrom(XElement xE)
 {
     Header      = null;
     Description = null;
     FinalUrls   = null;
     Price       = null;
     PriceUnit   = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "header")
         {
             Header = xItem.Value;
         }
         else if (localName == "description")
         {
             Description = xItem.Value;
         }
         else if (localName == "finalUrls")
         {
             FinalUrls = new UrlList();
             FinalUrls.ReadFrom(xItem);
         }
         else if (localName == "price")
         {
             Price = new MoneyWithCurrency();
             Price.ReadFrom(xItem);
         }
         else if (localName == "priceUnit")
         {
             PriceUnit = PriceExtensionPriceUnitExtensions.Parse(xItem.Value);
         }
     }
 }
 public virtual void ReadFrom(XElement xE)
 {
     FeedAttributeId        = null;
     IntegerValue           = null;
     DoubleValue            = null;
     BooleanValue           = null;
     StringValue            = null;
     IntegerValues          = null;
     DoubleValues           = null;
     BooleanValues          = null;
     StringValues           = null;
     MoneyWithCurrencyValue = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "feedAttributeId")
         {
             FeedAttributeId = long.Parse(xItem.Value);
         }
         else if (localName == "integerValue")
         {
             IntegerValue = long.Parse(xItem.Value);
         }
         else if (localName == "doubleValue")
         {
             DoubleValue = double.Parse(xItem.Value);
         }
         else if (localName == "booleanValue")
         {
             BooleanValue = bool.Parse(xItem.Value);
         }
         else if (localName == "stringValue")
         {
             StringValue = xItem.Value;
         }
         else if (localName == "integerValues")
         {
             if (IntegerValues == null)
             {
                 IntegerValues = new List <long>();
             }
             IntegerValues.Add(long.Parse(xItem.Value));
         }
         else if (localName == "doubleValues")
         {
             if (DoubleValues == null)
             {
                 DoubleValues = new List <double>();
             }
             DoubleValues.Add(double.Parse(xItem.Value));
         }
         else if (localName == "booleanValues")
         {
             if (BooleanValues == null)
             {
                 BooleanValues = new List <bool>();
             }
             BooleanValues.Add(bool.Parse(xItem.Value));
         }
         else if (localName == "stringValues")
         {
             if (StringValues == null)
             {
                 StringValues = new List <string>();
             }
             StringValues.Add(xItem.Value);
         }
         else if (localName == "moneyWithCurrencyValue")
         {
             MoneyWithCurrencyValue = new MoneyWithCurrency();
             MoneyWithCurrencyValue.ReadFrom(xItem);
         }
     }
 }