title: Confused on how to read xml object returned by curl in php
body: <p>This is my php code:</p>
  
  <pre><code>&lt;?php   
  if (array_key_exists("site", $_GET) &amp;&amp; $_GET["site"] != "" )
  { 
      $url = $_REQUEST['site'];
      $url = " http://api.mywot.com/0.4/public_query2?target=";   
      $result= $url.urlencode($url); 
      $process = curl_init($result); 
      //init curl connection
      curl_setopt($process, CURLOPT_HEADER, 0);    
      curl_setopt($process, CURLOPT_POST, 1); 
      curl_setopt($process, CURLOPT_RETURNTRANSFER,1);
      curl_setopt($process,CURLOPT_CONNECTTIMEOUT,1);
      $resp = curl_exec($process); 
      curl_close($process); 
      header('Content-Type: text/xml');
      $xml = new SimpleXMLElement($resp);
  }
  ?&gt;
  </code></pre>
  
  <p>Assumed xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;query target="example.com"&gt;
     &lt;application name="0" r="89" c="44"/&gt;
     &lt;application name="1" r="89" c="46"/&gt;
     &lt;application name="2" r="92" c="47"/&gt;
     &lt;application name="4" r="93" c="48"/&gt;
   &lt;/query&gt;
  </code></pre>
  
  <p>I know how to read this kind of xml file</p>
  
  <pre><code>&lt;Status&gt;
      &lt;code&gt;200&lt;/code&gt;
      &lt;request&gt;geocode&lt;/request&gt;
  &lt;/Status&gt;
  </code></pre>
  
  <p><code>$status = (int) $xml-&gt;Status-&gt;code;</code></p>
  
  <p>The above xml has repeated tags such as <code>application</code>, how can I read certain ones?</p>