title: Check if remote file is well-formed XML with PHP
body: <p>I have a PHP-driven site that includes an XML stock feed, which is remotely served from ASP (i.e. the XML feed url is of the order: <a href="http://remote.com/client.asp" rel="noreferrer">http://remote.com/client.asp</a>).</p>
  
  <p>As the feed is often unavailable (by which I mean the site returns an ASP error) I'd like to check if the feed is well-formed XML before including it. My usual url_exists function doesn't do the trick as of course the URL does exist even when 'erroring'.</p>
  
  <p>TIA.</p>