I have a server-side xQuery which transforms an XML file into an HTML document. I want to send a request behind the scenes to that xQuery, get the HTML back, and inject it in my page, obviously retaining all the structure as it is without parsing it or traversing the nodes again.
function loadXSLtoHTML () {
document.getElementById('xslt-transformation').innerHTML = this.respinseXML
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", loadXSLtoHTML);
oReq.open("GET", "xquery generating HTML");
oReq.responseType = "document";
oReq.send();
I know about the limitations of XHR calls. Is there really not a way of keeping my response HTML and injecting it as it is?