I am trying to parse an XML file using Javascript, but I keep getting the same error:
SyntaxError: malformed hexadecimal character escape sequence
$.get('C:\Users\xxxxxx\Desktop\xmloutput.xml', function(xml) {
and it points to the single-quotes right before the C. I looked up the error, but there isn't much information about how to get around it. Or is my syntax incorrect? Here is my code:
$(document).ready(function(){
var data = new Array();
// Load the data from the XML file
$.get('C:\Users\plk7504\Desktop\xmloutput.xml', function(xml) {
// Split the lines
var $xml = $(xml);
// push series
$xml.find('row').each(function(i, row) {
var seriesOptions = {
Category: $(series).find('Category').text(),
Actual: $(series).find('Actual').text(),
Plan: $(series).find('Plan').text(),
Variance: $(series).find('Variance').text(),
};
// add it to the options
data.push(seriesOptions);
});
});
$("#month_an_plan1").replaceWith(data[0]);
});