var iframe = $('#auditframe').get(0).contentWindow;
iframe.document.open("text/xml", "replace");
iframe.document.write(xml);
This works. My iframe gets populated with a valid xml string. But is there any way to open the iframe in a new window? I want the user to see the XML document that has been added to the frame. Is there any way to solve this?
Thanks
Similar technique, except you open a blank window, create a new document in the window, and then write the content you want. See this fiddle for a working example: http://jsfiddle.net/2v3Gr/