Ebay api GetSellerList, Parsing response XML

。_饼干妹妹 提交于 2019-12-02 11:05:32

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;
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!