title: How to get xml Curl Response
body: <p>I am use curl method to get response from server.
    but when ehco this response it show as simple data.
  but in view source it show xml format.</p>
  
  <p>can anybody tell me how to print response as xml</p>
  
  <p>I am using this code:</p>
  
  <pre><code>$ch = curl_init();
  
  //set the url, number of POST vars, POST data
  curl_setopt($ch,CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 
  //curl_setopt($ch,CURLOPT_POST, count($fields));
  curl_setopt($ch,CURLOPT_POSTFIELDS, $post_data_tcetra);
  
  //execute post
  $result = curl_exec($ch);
  
  //close connection
  curl_close($ch);
  </code></pre>