我试图解析xml,但得到了一些错误
http://fincha.com/kunden/gordon/
我得到了整个xml,而不仅仅是所需的
$xmlStr = file_get_contents('http://demo-q4:gO62OGvh@de.channel.pangora.com:80/livexml/2.1/demo-de.portal.xml/query/apple+ipod?srt=rel&pgn='.$page.'&pge=10');
$xmlObj = simplexml_load_string($xmlStr);
print_r($xmlObj->{product-results-module}->{product-results});我只是需要这些产品,请帮帮我
发布于 2010-10-12 04:00:16
foreach($xmlObj->{"product-results-module"}->{"product-results"}->{"product"} as $produkt)发布于 2010-10-12 04:01:52
别忘了单引号
print_r($xmlObj->{'product-results-module'}->{'product-results'});https://stackoverflow.com/questions/3909151
复制相似问题