开发者

SimpleXML xpath directing (Google Checkout)

开发者 https://www.devze.com 2023-03-06 03:59 出处:网络
Integrating the google checkout response into simplexml so i can pull the data and save it, but for the annoying reasons can\'t seem to pull the data out.

Integrating the google checkout response into simplexml so i can pull the data and save it, but for the annoying reasons can't seem to pull the data out.

Trying to get the item names 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: 开发者_JS百科',$node,"\n";
    }

I've tried different approaches

$book = $xml->xpath('/authorization-amount-notification/order-summary/shopping-cart/items/item/item-name');


Look at the Google Checkout PHP client library source code for more ideas, in particular at the XML parser:

http://code.google.com/apis/checkout/samplecode.html

0

精彩评论

暂无评论...
验证码 换一张
取 消