And the answer is....
var oXmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
oXmlHttp.Open("PUT", XDocument.URI, false);
oXmlHttp.Send(XDocument.DOM.xml);
This of course only works when you are opening an existing form, but it works very nicely. Now, to get the window to close....hmmmmm