title: Hiding XML code in view source code
body: <p>I have to send an XML request to recover data from a remote server and parse it using PHP. That much, I've managed to do... sort of. The trouble is, the XML I get back from the remote server looks something like this:</p>
  
  <pre><code>&lt;info user="user" password="password" session="session"&gt;
      &lt;data value="8" /&gt;
      &lt;data date="..." /&gt;
  </code></pre>
  
  <p>If someone were to look at the source code on my website, they would see all of the above code including the sensitive username and password data included in the first tag, is there any way I can hide this?</p>
  
  <p>Here is the code I use to recover and parse the data:</p>
  
  <pre><code>&lt;?php 
  
  $url = 'http://www.whereigetmyxml.com';
  
  $ch = curl_init();     
  
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
  
  curl_setopt($ch, CURLOPT_URL, $url);  
  
  $result = curl_exec($ch);  
  
  curl_close($ch);  
  
  echo $result; 
  
  $xml = simplexml_load_file($url);
  
  $myData = $xml-&gt;data[1]['date'];
  echo $myData;
  
  ?&gt; 
  </code></pre>
  
  <p>Thanks!</p>