title: How to get xml element values using XmlNodeList in c#
body: <p>I need to store the element values which are inside the nodes "member" . I have tried the following code but I can't achieve it. How to get the values. Any help would be appreciated</p>
  
  <p><strong>XML:</strong></p>
  
  <pre><code> &lt;ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/"&gt;
    &lt;ListInventorySupplyResult&gt;
      &lt;InventorySupplyList&gt;
        &lt;member&gt;
          &lt;SellerSKU&gt;043859634910&lt;/SellerSKU&gt;
          &lt;FNSKU&gt;X000IA4045&lt;/FNSKU&gt;
          &lt;ASIN&gt;B005YV4DJO&lt;/ASIN&gt;
          &lt;Condition&gt;NewItem&lt;/Condition&gt;
          &lt;TotalSupplyQuantity&gt;7&lt;/TotalSupplyQuantity&gt;
          &lt;InStockSupplyQuantity&gt;7&lt;/InStockSupplyQuantity&gt;
          &lt;EarliestAvailability&gt;
            &lt;TimepointType&gt;Immediately&lt;/TimepointType&gt;
          &lt;/EarliestAvailability&gt;
          &lt;SupplyDetail&gt;
          &lt;/SupplyDetail&gt;
        &lt;/member&gt;
      &lt;/InventorySupplyList&gt;
    &lt;/ListInventorySupplyResult&gt;
    &lt;ResponseMetadata&gt;
      &lt;RequestId&gt;58c9f4f4-6f60-496a-8d71-8fe99ce301c9&lt;/RequestId&gt;
    &lt;/ResponseMetadata&gt;
  &lt;/ListInventorySupplyResponse&gt;
  </code></pre>
  
  <p><strong>C# Code:</strong></p>
  
  <pre><code>string a = Convert.ToString(oInventorySupplyRes.ToXML());
   XmlDocument oXdoc = new XmlDocument();
   oXdoc.LoadXml(a);
   XmlNodeList oInventorySupplyListxml = oXdoc.SelectNodes("//member");
   foreach (XmlNode itmXml in oInventorySupplyListxml)
   {
      // var cond = itmXml.InnerXml.ToString();
       var asinVal = itmXml.SelectSingleNode("ASIN").Value;
       var TotalSupplyQuantityVal = itmXml.SelectSingleNode("TotalSupplyQuantity").Value;
   }
  </code></pre>
  
  <p><strong>ResultView</strong> <code>: "Enumeration yielded no results" and count = 0;</code></p>
  
  <p><strong>Edit 1:</strong></p>
  
  <pre><code> string a = Convert.ToString(oInventorySupplyRes.ToXML());
                  var status = oInventorySupplyResult.InventorySupplyList;
                  XmlDocument oXdoc = new XmlDocument();
                  var doc = XDocument.Parse(a);
                  var r = doc.Descendants("member")
                             .Select(member =&gt; new
                             {
                                 ASIN = member.Element("ASIN").Value,
                                 TotalSupplyQuantity = member.Element("TotalSupplyQuantity").Value
                             });
  </code></pre>