title: Does jQuery strip some html elements from a string when using .html()?
body: <p>I have a var that contains a full html page, including the head, html, body, etc.  When I pass that string into the .html() function, jQuery strips out all those elements, such as body, html, head, etc, which I don't want.</p>
  
  <p>My data var contains:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Then my jQuery is:</p>
  
  <pre><code>// data is a full html document string
  data = $('&lt;div/&gt;').html(data);
  // jQuery stips my document string!
  alert(data.find('head').html());
  </code></pre>
  
  <p>I am needing to manipulate a full html page string, so that I can return what is in the  element.  I would like to do this with jQuery, but it seems all of the methods, append(), prepend() and html() all try to convert the string to dom elements, which remove all the other parts of a full html page.</p>
  
  <p>Is there another way that I could do this?  I would be fine using another method. My final goal is to find certain elements inside my string, so I figured jQuery would be best, since I am so used to it.  But, if it is going to trim and remove parts of my string, I am going to have to look for another method.</p>
  
  <p>Ideas?</p>