title: Converting HTMLDocument to a printable string
body: <p>I want to convert a Javascript DOM HTMLDcument to a string that I can write to a file. But how do you do the string conversion of the HTMLDocument to xml?!</p>
  
  <p><strong>Update</strong> If possible I'd like to see the html that is generated once any dynamic javascript rendering has been applied.</p>