parsing text response manually from ajax request

This commit is contained in:
Ezequiel Bergamaschi 2014-06-30 00:35:02 -03:00
parent aaf8be2f70
commit 6ab5597a82

View File

@ -38,10 +38,10 @@ mindplot.LocalStorageManager = new Class({
$.ajax({ $.ajax({
url: this.documentUrl.replace("{id}", mapId), url: this.documentUrl.replace("{id}", mapId),
type:'get', type:'get',
dataType: "xml", dataType: "text",
async: false, async: false,
success: function (responseText) { success:function (response) {
xml = responseText; xml = response;
} }
}); });
// If I could not load it from a file, hard code one. // If I could not load it from a file, hard code one.
@ -50,8 +50,7 @@ mindplot.LocalStorageManager = new Class({
} }
} }
var parser = new DOMParser(); return jQuery.parseXML(xml);
return parser.parseFromString(xml, 'text/xml');
}, },
unlockMap:function (mindmap) { unlockMap:function (mindmap) {