title: Load HTML string into DOM tree with Javascript
body: <p>I'm currently working with an automation framework that is pulling a webpage down for analysis, which is then presented as a string for processing.  The Rhino Javascript engine is available to assist in parsing the returned web page.</p>
  
  <p>It seems that if the string (which is a complete webpage) can be loaded in a DOM representation, it would provide a very nice interface for parsing and analyzing content.  </p>
  
  <p>Using only Javascript, is this a possible and/or feasible concept?  </p>
  
  <p><b>Edit:</b></p>
  
  <p>I'll decompose the question for clarify: Say I have an string in javascript that contains html like such:</p>
  
  <pre>
  <code>
  var $mywebpage = '&lt;!DOCTYPE HTML PUB ...//snipped//... &lt;/body&gt;&lt;/html&gt;';
  </code>
  </pre>
  
  <p>is it possible/realistic to load it somehow into a dom object?</p>