将google checkout响应集成到simplexml中,以便我可以提取数据并保存,但由于烦人的原因似乎无法将数据拉出来。
试图获取项目名称Bridges:Liquids and Gases,Bridges:Habitats of Australia
SimpleXML = http://pastie.org/private/qtmbsgtinv7x5g6ikrzq
$xml = new \SimpleXMLElement($raw_xml);
$book = $xml->xpath('//item-name');
while(list( , $node) = each($book)) {
echo 'Book: ',$node,"\n";
}
我尝试了不同的方法
$book = $xml->xpath('/authorization-amount-notification/order-summary/shopping-cart/items/item/item-name');
答案 0 :(得分:0)
查看Google Checkout PHP客户端库源代码以获取更多想法,特别是在XML解析器中: