var doc = document.implementation.createHTMLDocument(); doc.documentElement.innerHTML = xhr.responseText;