I'm attempting to use jQuery to load the contents of a plaintext (.bib) file. Despite my best attempts, the file seems to be interpreted as XML, leading to a parsing error.
Code:
$(document).ready(function(){
$.ajax({
url: "publications.bib",
contentType: "text/plain",
dataType: "text",
type: "GET",
success: function(response) {
console.log(response);
}
}, 'text');
});
As you can see, I'm desperately trying to make it interpret it as text and not XML. How do I fix this?
The full error is:
XML Parsing Error: not well-formed
Location: http://localhost/publications.bib
Line Number 1, Column 1: