parsing text response manually from ajax request

This commit is contained in:
Ezequiel Bergamaschi 2014-06-30 00:35:02 -03:00
parent 8263b1abeb
commit 9afb13b02f

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) {