I'm trying to fetch and parse an XML-file through javascript. I don't control the XML-file.
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?
Files just start with:
<?xml version="1.0"?>
And the only thing in javascript to to parse is:
var parser = new DOMParser();
var dom = parser.parseFromString(responseDetails.responseText,"application/xml");
jQuery-answers are fine btw, not using it for this part but it is available.