title: How to make a dynamic xml file that I can access through js with php
body: <p>I have a php web scraper that scrapes a site, but what I would like to do is with the data it found to output that as a xml file, which needs to be accessible by javascript. For some reason it is not coming back as a Xml file but just a html file.</p>
  <p>Please let me know if I need to make anything clearer.</p>
  <p>EDIT(Code Added):</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;?php 
  ...scraper code...
  $link = $html-&gt;find('a', 19);
  
  echo'&lt;user&gt;';
  echo '&lt;link&gt;'.$link-&gt;plaintext.'&lt;/link&gt;';
  echo'&lt;/user&gt;';
  
  ?&gt;
  </code></pre>
  <p>When I open this I just get the value of $link in html tags.</p>