title: XML Document to IEnumerable<XElement> and get values
body: <p>Hey guys I'm   trying to get some values from a deeper container in my xdocument but i always run in an Nullreference. </p>
  
  <p>This is my code so far:</p>
  
  <pre><code>                StreamReader xmlStream = new StreamReader(rsp.GetResponseStream());
              string XMLstr = xmlStream.ReadToEnd();
              XDocument xelement = XDocument.Parse(XMLstr);
              xmlStream.Close();
  
  
              IEnumerable&lt;XElement&gt; items = xelement.Elements();
  
              foreach (var item in items )
              {
                  Console.WriteLine(item.Element("ItemID").Value.ToString());
              }
  </code></pre>
  
  <p>This is the XML I want to work with:</p>
  
  <pre><code>    &lt;GetSellerListResponse xmlns="urn:ebay:apis:eBLBaseComponents"&gt;
    &lt;Timestamp&gt;2016-02-26T22:02:38.968Z&lt;/Timestamp&gt;
    &lt;Ack&gt;Success&lt;/Ack&gt;
    &lt;Version&gt;967&lt;/Version&gt;
    &lt;Build&gt;967_CORE_BUNDLED_10708779_R1&lt;/Build&gt;
    &lt;PaginationResult&gt;
      &lt;TotalNumberOfPages&gt;14&lt;/TotalNumberOfPages&gt;
      &lt;TotalNumberOfEntries&gt;27&lt;/TotalNumberOfEntries&gt;
    &lt;/PaginationResult&gt;
    &lt;HasMoreItems&gt;true&lt;/HasMoreItems&gt;
    &lt;ItemArray&gt;
      &lt;Item&gt;
        &lt;AutoPay&gt;false&lt;/AutoPay&gt;
        &lt;BuyerProtection&gt;ItemIneligible&lt;/BuyerProtection&gt;
        &lt;Country&gt;US&lt;/Country&gt;
        &lt;Currency&gt;USD&lt;/Currency&gt;
        &lt;HitCounter&gt;NoHitCounter&lt;/HitCounter&gt;
        &lt;ItemID&gt;110043597553&lt;/ItemID&gt;
        &lt;ListingDetails&gt;
          &lt;StartTime&gt;2016-02-12T23:35:27.000Z&lt;/StartTime&gt;
          &lt;EndTime&gt;2016-02-19T23:35:27.000Z&lt;/EndTime&gt;
          &lt;ViewItemURL&gt;http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;
             item=110043597553&amp;category=41393&lt;/ViewItemURL&gt;
          &lt;HasUnansweredQuestions&gt;false&lt;/HasUnansweredQuestions&gt;
          &lt;HasPublicMessages&gt;false&lt;/HasPublicMessages&gt;
          &lt;BuyItNowAvailable&gt;true&lt;/BuyItNowAvailable&gt;
        &lt;/ListingDetails&gt;
        &lt;ListingDuration&gt;Days_7&lt;/ListingDuration&gt;
        &lt;Location&gt;Santa Cruz, California&lt;/Location&gt;
        &lt;PrimaryCategory&gt;
          &lt;CategoryID&gt;41393&lt;/CategoryID&gt;
          &lt;CategoryName&gt;Collectibles:Decorative Collectibles:Other&lt;/CategoryName&gt;
        &lt;/PrimaryCategory&gt;
        &lt;Quantity&gt;1&lt;/Quantity&gt;
        &lt;ReviseStatus&gt;
          &lt;ItemRevised&gt;false&lt;/ItemRevised&gt;
        &lt;/ReviseStatus&gt;
        &lt;SecondaryCategory&gt;
          &lt;CategoryID&gt;95116&lt;/CategoryID&gt;
          &lt;CategoryName&gt;Collectibles:Disneyana:Contemporary (1968-Now):Bobblehead Figures&lt;/CategoryName&gt;
        &lt;/SecondaryCategory&gt;
        &lt;SellingStatus&gt;
          &lt;BidCount&gt;0&lt;/BidCount&gt;
          &lt;BidIncrement currencyID="USD"&gt;0.5&lt;/BidIncrement&gt;
          &lt;ConvertedCurrentPrice currencyID="USD"&gt;11.49&lt;/ConvertedCurrentPrice&gt;
          &lt;CurrentPrice currencyID="USD"&gt;11.49&lt;/CurrentPrice&gt;
          &lt;MinimumToBid currencyID="USD"&gt;11.49&lt;/MinimumToBid&gt;
          &lt;QuantitySold&gt;0&lt;/QuantitySold&gt;
          &lt;SecondChanceEligible&gt;false&lt;/SecondChanceEligible&gt;
          &lt;ListingStatus&gt;Completed&lt;/ListingStatus&gt;
        &lt;/SellingStatus&gt;
        &lt;ShipToLocations&gt;US&lt;/ShipToLocations&gt;
        &lt;Site&gt;US&lt;/Site&gt;
        &lt;Storefront&gt;
          &lt;StoreCategoryID&gt;1&lt;/StoreCategoryID&gt;
          &lt;StoreCategory2ID&gt;0&lt;/StoreCategory2ID&gt;
          &lt;StoreURL&gt;http://www.stores.sandbox.ebay.com/id=132854966&lt;/StoreURL&gt;
        &lt;/Storefront&gt;
        &lt;SubTitle&gt;Micky, with the ears!&lt;/SubTitle&gt;
        &lt;TimeLeft&gt;PT0S&lt;/TimeLeft&gt;
        &lt;Title&gt;Kelly's Kitsch&lt;/Title&gt;
        &lt;WatchCount&gt;0&lt;/WatchCount&gt;
        &lt;PostalCode&gt;95062&lt;/PostalCode&gt;
        &lt;PictureDetails&gt;
          &lt;GalleryURL&gt;http://thumbs.ebaystatic.com/pict/41007087008080_0.jpg&lt;/GalleryURL&gt;
          &lt;PhotoDisplay&gt;None&lt;/PhotoDisplay&gt;
          &lt;PictureURL&gt;http://thumbs.ebaystatic.com/pict/41007087008080_0.jpg&lt;/PictureURL&gt;
        &lt;/PictureDetails&gt;
        &lt;ProxyItem&gt;false&lt;/ProxyItem&gt;
        &lt;ReturnPolicy&gt;
          &lt;RefundOption&gt;MoneyBack&lt;/RefundOption&gt;
          &lt;Refund&gt;Money Back&lt;/Refund&gt;
          &lt;ReturnsWithinOption&gt;Days_30&lt;/ReturnsWithinOption&gt;
          &lt;ReturnsWithin&gt;30 Days&lt;/ReturnsWithin&gt;
          &lt;ReturnsAcceptedOption&gt;ReturnsAccepted&lt;/ReturnsAcceptedOption&gt;
          &lt;ReturnsAccepted&gt;Returns Accepted&lt;/ReturnsAccepted&gt;
          &lt;Description&gt;Returns accepted only if item is not as described.&lt;/Description&gt;
          &lt;ShippingCostPaidByOption&gt;Buyer&lt;/ShippingCostPaidByOption&gt;
          &lt;ShippingCostPaidBy&gt;Buyer&lt;/ShippingCostPaidBy&gt;
        &lt;/ReturnPolicy&gt;
        &lt;PaymentAllowedSite&gt;US&lt;/PaymentAllowedSite&gt;
      &lt;/Item&gt;
     &lt;/ItemArray&gt;
    &lt;ItemsPerPage&gt;2&lt;/ItemsPerPage&gt;
    &lt;PageNumber&gt;1&lt;/PageNumber&gt;
    &lt;ReturnedItemCountActual&gt;2&lt;/ReturnedItemCountActual&gt;
  &lt;/GetSellerListResponse&gt;
  </code></pre>
  
  <p>Can anybody please explain what I am missing?</p>
  
  <p>Thanks</p>