How to jump into and loop through XML element

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PHP newbie coming over from Perl.  Been trying to convert some of my Perl
scripts over to PHP5.  I am making a request to Amazon and receiving the
following response.  How can I jump down to the <Item> element and loop
through all the ones that exist.  I have been trying to do this with XML
Simple, but with no success.
Thanks, Ethan

<?xml version="1.0" encoding="UTF-8"?>
<ItemSearchResponse xmlns="
http://webservices.amazon.com/AWSECommerceService/2006-11-14";>
 <OperationRequest>
  <HTTPHeaders>
   <Header Name="UserAgent">
   </Header>
   </HTTPHeaders>
    <RequestId>xxxxxxxxxxxxx</RequestId>
    <Arguments>
     <Argument Name="SearchIndex" Value="Books">
     </Argument>
      <Argument Name="AssociateTag" Value="xxxxxxxxxxx">
      </Argument>
       <Argument Name="Service" Value="AWSECommerceService">
       </Argument>
        <Argument Name="Keywords" Value="Perl">
        </Argument>
         <Argument Name="ResponseGroup" Value="Request,Medium">
         </Argument>
          <Argument Name="Operation" Value="ItemSearch">
          </Argument>
           <Argument Name="AWSAccessKeyId" Value="xxxxxxxxxxxxxxxxxx">
           </Argument>
            <Argument Name="Version" Value="2006-11-14">
            </Argument>
            </Arguments>

<RequestProcessingTime>0.176347017288208</RequestProcessingTime>
            </OperationRequest>
            <Items>
             <Request>
              <IsValid>True</IsValid>
              <ItemSearchRequest>
               <Keywords>Perl</Keywords>
               <ResponseGroup>Medium</ResponseGroup>
               <ResponseGroup>Request</ResponseGroup>
               <SearchIndex>Books</SearchIndex>
              </ItemSearchRequest>
             </Request>
             <TotalResults>1893</TotalResults>
             <TotalPages>190</TotalPages>
             <Item>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux