Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6532735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:02:26+00:00 2026-05-25T10:02:26+00:00

I am using Linq to XML with the eBay API and am unable to

  • 0

I am using Linq to XML with the eBay API and am unable to retrieve even basic information from the XML returned. I have tried every combination of from x in y select z etc but am having no luck.

I am loading the data with

var xml = XDocument.Load ("http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=***MY-KEY-OBSCURED**&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=yamaha&paginationInput.entriesPerPage=1&paginationInput.pageNumber=1");

And I get back the following XML according to the console and LINQPad.

<findItemsByKeywordsResponse xmlns="http://www.ebay.com/marketplace/search/v1/services">   <ack>Success</ack>   <version>1.11.0</version>   <timestamp>2011-09-04T12:15:10.595Z</timestamp>   <searchResult count="1">
    <item>
      <itemId>220841819907</itemId>
      <title>YAMAHA RX-V592 SURROUND SOUND RECEIVER</title>
      <globalId>EBAY-US</globalId>
      <primaryCategory>
        <categoryId>14981</categoryId>
        <categoryName>Receivers</categoryName>
      </primaryCategory>
      <galleryURL>http://thumbs4.ebaystatic.com/pict/2208418199074040_1.jpg</galleryURL>
      <viewItemURL>http://www.ebay.com/itm/YAMAHA-RX-V592-SURROUND-SOUND-RECEIVER-/220841819907?pt=Receivers_Tuners</viewItemURL>
      <productId type="ReferenceID">46568009</productId>
      <paymentMethod>PayPal</paymentMethod>
      <autoPay>false</autoPay>
      <postalCode>76638</postalCode>
      <location>Crawford,TX,USA</location>
      <country>US</country>
      <shippingInfo>
        <shippingServiceCost currencyId="USD">22.0</shippingServiceCost>
        <shippingType>Flat</shippingType>
        <expeditedShipping>false</expeditedShipping>
        <oneDayShippingAvailable>false</oneDayShippingAvailable>
        <handlingTime>3</handlingTime>
        <shipToLocations>US</shipToLocations>
      </shippingInfo>
      <sellingStatus>
        <currentPrice currencyId="USD">51.0</currentPrice>
        <convertedCurrentPrice currencyId="USD">51.0</convertedCurrentPrice>
        <bidCount>13</bidCount>
        <sellingState>Active</sellingState>
        <timeLeft>P0DT0H18M17S</timeLeft>
      </sellingStatus>
      <listingInfo>
        <bestOfferEnabled>false</bestOfferEnabled>
        <buyItNowAvailable>false</buyItNowAvailable>
        <startTime>2011-08-28T12:33:27.000Z</startTime>
        <endTime>2011-09-04T12:33:27.000Z</endTime>
        <listingType>Auction</listingType>
        <gift>false</gift>
      </listingInfo>
      <returnsAccepted>false</returnsAccepted>
      <condition>
        <conditionId>3000</conditionId>
        <conditionDisplayName>Used</conditionDisplayName>
      </condition>
      <isMultiVariationListing>false</isMultiVariationListing>
    </item>   </searchResult>   <paginationOutput>
    <pageNumber>1</pageNumber>
    <entriesPerPage>1</entriesPerPage>
    <totalPages>819204</totalPages>
    <totalEntries>819204</totalEntries>   </paginationOutput>   <itemSearchURL>http://www.ebay.com/sch/i.html?_nkw=yamaha&amp;_ddo=1&amp;_ipg=1&amp;_pgn=1</itemSearchURL> </findItemsByKeywordsResponse>

Can anyone please help me find the 1st tier info such as ack and version and then the information nested within searchResult->Item.

So by the above I mean the values of the elements…

findItemsByKeywordsResponse->ack
findItemsByKeywordsResponse->version

and also the nested information

findItemsByKeywordsResponse->searchResult->item->itemId
findItemsByKeywordsResponse->searchResult->item->title

I have spent days trawling sites for the answer but have found no working solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:02:26+00:00Added an answer on May 25, 2026 at 10:02 am

    You haven’t shown any of the code that you’ve tried, but I strongly suspect you’re just missing the namespace. Code like this:

    XNamespace ns = "http://www.ebay.com/marketplace/search/v1/services"
    
    XElement ack = doc.Root.Element(ns + "ack");
    XElement version = doc.Root.Element(ns + "version");
    IEnumerable<string> itemIds = doc.Root.Elements(ns + "searchResult")
                                          .Element(ns + "item")
                                          .Element(ns + "itemId")
                                          .Select(x => (string) x);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xml file from which I am extracting html using LINQ to
Using Linq To XML, how can I get the space_id value (720) from the
How to write binary data into XML using LINQ which is being read from
I am using Linq To Xml to create an Xml file from DataSet. This
I have been using Linq to XML for a few hours and while it
I'm just getting started using Linq to XML and I have a simple document
I have no problem using linq to xml to query xml but I have
I have an xml string that I wish to traverse using LINQ to XML
I am using LINQ to XML to take some data from resources , and
I want to remove sub elements from an XML doc using LINQ to XML.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.