title: Convert HTML object back to string
body: <p>I convert a string of HTML into an object so I can manipulate like this</p>
  
  <pre><code>var HTMLStr = "&lt;div&gt;&lt;span&gt;TESTING&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;HEADING&lt;/h1&gt;&lt;div class='two'&gt;sjdufhs&lt;/div&gt;";
  var HTMLDom = $(HTMLStr).find("h1").remove();
  var newHTMLStr = ???
  </code></pre>
  
  <p>Question: How can I convert the HTMLDom back into a string after manipulation?</p>
  
  <p>I have tried the following: <a href="https://stackoverflow.com/a/652771/3758078">https://stackoverflow.com/a/652771/3758078</a>
  But that only converts the first element found, and not the rest. Especially if theres no element containing all other elements.</p>