Скажет, что что-то вроде этого может быть допустимым XML, но, вероятно, отсутствуют имена полей.
var data = {0: "2", 1: "105920808", 2: "Carlos Briceño", 3: "212135", 4: "cbrice@femw.com", 5: "3213asdasdas", 6: "cmbriceno@gmail.com", 7: "87047866", 8: "87047866", 9: "1", 10: "55", 11: "8", 12: "Urbanizacion Las Lomas", 13: "Alto de Guadalupe, Urbanización las Lomas", 14: "324131", 15: "pass1 ", 16: "444444444444", 17: "1231", 18: "321", 19: "32", 20: "1", 21: "1", 22: "98", 23: "Carlos", 24: "0", 25: "cmbriceno@gmail.com", 26: "24402969", 27: "87047866", 28: "0", 29: "0", 30: "0", 31: "", 32: "", 33: "1231132", 34: "Cambiar AE", 35: "02", 36: "CRC", 37: "01", 38: "565.28", 39: "01", 40: ["1", "123456", "1", "I", "100000", "Linea 1", "", "", "08"], 41: ["1", "10101", "1", "Alc", "20000", "linea 2 ", "10", "", "08"], 42: "This is a test", 43: "118000", 44: "", 45: "", 46: "", 47: "", 48: "", 49: "118000", 50: "", 51: "", 52: "2000", 53: "118000", 54: "116000", 55: "", 56: "", 57: "133340" };
function print2XML(data, y) {
var res = '';
for(var x in data) {
var idx = y ? (y + '.' + x) : x;
if (data[x].constructor == Array) {
res += '<Item' + idx + '>\n' + print2XML(data[x], idx) + '</Item' + idx + '>\n';
}
else res += '<Item' + idx + '>' + data[x] + '</Item' + idx + '>\n';
}
return res;
}
console.log('<yourXMLdata>\n' + print2XML(data) + '</yourXMLdata>');
document.write(('<yourXMLdata>\n' + print2XML(data) + '</yourXMLdata>').replace(/</g,'<').replace(/>/g,'>').replace(/\n/g,'<br>'));
document.close();