title: How to parse xml in JavaScript?
body: <p>I'm trying to fetch and parse an XML-file through JavaScript. I don't control the XML-file.</p>
  <p>Now somehow the encoding of some XML-files changed, which results in the code not being able to parse the file as far as I can tell. It used to be ANSI, some are Unicode now (and those are failing). Is there a way for me to correctly get the content, so both versions (ANSI and Unicode) work?</p>
  <p>Files just start with:
  <code>&lt;?xml version=&quot;1.0&quot;?&gt; </code></p>
  <p>And the only thing in javascript to to parse is:</p>
  <pre><code>var parser = new DOMParser();
  var dom = parser.parseFromString(responseDetails.responseText,&quot;application/xml&quot;);
  </code></pre>