title: prestashop webservice : using PHP to make a CRUD application, issue retrieving informations on an XML
body: <p>good day, i'm starting a CRUD application on prestashop, i would like to use the webservice to update, create or delete the products, users and orders via a php application started by the program that manage the storage.</p>
  
  <p>i've look at the prestashop guide:
  <a href="http://doc.prestashop.com/display/PS15/Using+the+PrestaShop+Web+Service" rel="nofollow">http://doc.prestashop.com/display/PS15/Using+the+PrestaShop+Web+Service</a></p>
  
  <p>and now i'm trying to get the things done.</p>
  
  <p>i'm actually recieving an xml which represent the structure of a product:</p>
  
  <pre><code>&lt;?php
  // Here we define constants /!\ You need to replace this parameters
  define('DEBUG', true);
  define('PS_SHOP_PATH', 'http://www.server.com/prestashop/');
  define('PS_WS_AUTH_KEY', 'blahblahbla');
  require_once('./PSWebServiceLibrary.php');
  
  
  
  
      $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
      $opt = array('resource' =&gt; 'products');
      $opt['id'] =1;
  
          $xml = $webService-&gt;get($opt);
          $resources = $xml-&gt;children()-&gt;children();
  
  
  
  foreach ($resources as $nodeKey =&gt; $node)
      {
  
          echo $nodeKey . " : ". $resources-&gt;$nodeKey ."&lt;br&gt;";
      }
  
  
  /*$opt = array('resource' =&gt; 'products');
  $opt['putXml'] = $xml-&gt;asXML();
  $opt['id'] = 1;
  $xml = $webService-&gt;edit($opt);*/
  
  
  ?&gt;
  </code></pre>
  
  <p>the first problem i got:</p>
  
  <p>the field "name" has some childs in the xml, which are the different lenguages so, in the loop where i navigate throught the nodes, i would like to "go into" those that have a child... because actually the name i try to "<code>echo</code>" is empty, but if i see the xml, i can see 2 nodes under <code>&lt;name&gt;</code> which contains the names in 2 different lenguages.
  thats all for now, i'll post more and more questions later :D</p>
  
  <p>thanks in advance!</p>