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

  • SEARCH
  • Home
  • 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 8304995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:58:50+00:00 2026-06-08T17:58:50+00:00

I am using the ebay trading api to get a sellers stock which is

  • 0

I am using the ebay trading api to get a sellers stock which is currently listed. I am using the call GetSellerList.I am having trouble parsing the xml which I would then insert into there website shop.

This is the xml request.

<GetSellerListRequest xmlns='urn:ebay:apis:eBLBaseComponents'>

<UserID>".$user_id."</UserID>

<DetailLevel>ReturnAll</DetailLevel>
<ErrorLanguage>RFC 3066</ErrorLanguage>
<WarningLevel>Low</WarningLevel>
<Version>".$compat_level."</Version>

<RequesterCredentials>
    <eBayAuthToken>".$auth_token."</eBayAuthToken>
</RequesterCredentials>

<StartTimeFrom>2012-06-12T23:35:27.000Z</StartTimeFrom>
<StartTimeTo>2012-08-30T23:35:27.000Z</StartTimeTo>

<Pagination>
    <EntriesPerPage>200</EntriesPerPage>
</Pagination>

<OutputSelector>ItemArray.Item.Title</OutputSelector>
<OutputSelector>ItemArray.Item.Description</OutputSelector>
<OutputSelector>ItemArray.Item.BuyItNowPrice</OutputSelector>
<OutputSelector>ItemArray.Item.Quantity</OutputSelector>

</GetSellerListRequest>

I am not the best with php, I am still learning so i have looked through w3schools and php docs and found nothing. I have been using this (off of ebay tuts) to try and get the values of the xml tags by using getElementsByTagName.

$dom = new DOMDocument();
$dom->loadXML($response);

$titles = $dom->getElementsByTagName('Title')->length > 0 ? $dom->getElementsByTagName('Title')->item(0)->nodeValue : ''; 

Now i was hoping that i would be able to create an array with this then use foreach to insert them into the db but when i use this it only gets the value of the first ‘Title’ tag

Im sure there is a way to create an array with all values of ‘Title’ in it.
All help is appreciated.

  • 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-06-08T17:58:51+00:00Added an answer on June 8, 2026 at 5:58 pm

    This would be easier to answer if you posted the response XML (just the relevant portion) rather than the request.

    The code you have will only grab the first item – specifically this part:

    $dom->getElementsByTagName('Title')->item(0)->nodeValue
    

    Rather, you’ll want to loop through all the Title elements and extract their nodeValue. This is a starting point:

    $dom = new DOMDocument();
    $dom->loadXML($response);
    $title_nodes = $dom->getElementsByTagName('Title');
    
    $titles = array();
    
    foreach ($title_nodes as $node) {
        $titles[] = $node->nodeValue;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Amazon and eBay API via PHP5 and Curl to get
I was trying to call eBay FindProducts API using AJAX ( post request) but
I wish to retrieve all sellers items using the findItemsAdvanced call of Zend_Service_Ebay_Finding API.
How do I get a large item image using the eBay API? The API
After using the ebay API recently, I was expecting it to be as simple
I am using Eclipse WTP plugin to generate the stub from this WSDL: https://api.sandbox.ebay.com/wsapi?wsdl
This should be simple, but I am having problems. Using the eBay .Net library,
I am using VB .Net to access the eBay API and store all completed
Using PHP5, how can I use the eBay API to set all my 2000+
I am using the code below using FindingAPI of Ebay to get all items

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.