title: Trouble parsing XML response from curl_exec
body: <p>I am submitting the contents of an HTML form to a 3rd-party service using cURL, and it shoots me back an XML response. But no matter what I'm doing I can't seem to parse that XML response to customize the display of the results.</p>
  
  <p>Here is the code for processing the form (note a few ID numbers have been censored):</p>
  
  <pre><code>&lt;?php
   $FirstName = $_POST['FirstName'] ;
   $LastName = $_POST['LastName'] ;
   $Zip = $_POST['Zip'] ;
   $EmailAddress = $_POST['EmailAddress'] ;
   $PrimaryPhoneNumber = $_POST['PrimaryPhoneNumber'] ;
   $DateofBirth = $_POST['DateofBirth'] ;
  
  
  
  $myvars = '&amp;VID=' . '****' . '&amp;LID=' . '****' . '&amp;AID=' . '****' . '&amp;FirstName=' . $FirstName . '&amp;LastName=' . $LastName .
         '&amp;EmailAddress=' . $EmailAddress . '&amp;PrimaryPhoneNumber=' . $PrimaryPhoneNumber . '&amp;Zip=' . $Zip . '&amp;DateofBirth=' . $DateofBirth;
  
  
  if ($FirstName!='' &amp;&amp; $LastName!='' &amp;&amp; $Zip!='' &amp;&amp; $EmailAddress!='' &amp;&amp; $PrimaryPhoneNumber!='' &amp;&amp; $DateofBirth!='') {
      $c = curl_init();
      curl_setopt($c, CURLOPT_URL, 'http://secure.leadexec.net/leadimport.asmx/LeadReceiver');
      curl_setopt($c, CURLOPT_POST, true);
      curl_setopt($c, CURLOPT_POSTFIELDS, $myvars);
      curl_exec ($c);
      curl_close ($c);
  
  } else {
      echo '&lt;p&gt;Please make sure you have filled out the form completely&lt;/p&gt;';
  }
  ?&gt;
  </code></pre>
  
  <p>This is the raw output of the response I get back:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;PostResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.leadproweb.com/"&gt;
    &lt;isValidPost&gt;false&lt;/isValidPost&gt;
    &lt;ResponseType&gt;Duplicate_Lead&lt;/ResponseType&gt;
    &lt;ResponseDetails&gt;Duplicate Lead, Last Received On: 9/27/2013 2:17:26 PM&lt;/ResponseDetails&gt;
    &lt;LeadIdentifier&gt;20889333&lt;/LeadIdentifier&gt;
    &lt;VendorAccountAssigned&gt;0&lt;/VendorAccountAssigned&gt;
    &lt;PendingQCReview&gt;false&lt;/PendingQCReview&gt;
    &lt;Price&gt;0&lt;/Price&gt;
    &lt;RedirectURL /&gt;
  &lt;/PostResponse&gt;
  </code></pre>
  
  <p>When I try using methods like <strong>SimpleXmlElement</strong> or <strong>simplexml_load_string()</strong> to parse the XML, they seem to be ignored and I can't get rid of the raw XML output unless I remove the <strong>curl_exec($c)</strong> line.</p>
  
  <p>Is there something I am doing wrong?</p>