I found a dirty workaround, load a local HTML (c:\temp\temp.html) and then modify the content of it via javascript.
After this point there is no more CrossDomain restrictions however using document.write causing other nasty problems such as JQuery .ready functions won't work.