My problem is the following: In my javascript, I load an XML document from a server.
var xmlDom = document.implementation.createDocument("","",null);
xmlDom.async=false;
xmlDom.load("init.xml");
The user can then modify this XML Document by editing various form elements of the displayed webpage. When finished, I'd like to open a new browser tab and display the modified xml in there, so that the user can save it. The question is how to do this without sending the xmlDocument to the server and back. My current hack displays nothing on the page but at least shows the xml in the page source.
xmlWindow = window.open("");
xmlWindow.document.open("text/xml");
xmlWindow.document.write(serializer.serializeToString(xmlDom));
xmlWindow.document.close();
xmlWindow.focus();
Someone any idea how to do this properly?