title: jQuery wrappers for HTML fragment vs xmlDOM fragment?
body: <p>I don't understand the conceptual and functional difference between a jQuery wrapper around xmlDom object vs plain old html markup.</p>
  
  <p>I can call jQuery methods on both but they act differently which surprises me a bit..  I guess I assumed I could wrap any html/ xml markup with jQuery and it would act about the same.  </p>
  
  <p>I'm using the xmlDOM plugin to get a jQuery wrapped xmlDom object:</p>
  
  <p><a href="http://outwestmedia.com/jquery-plugins/xmldom/" rel="nofollow">http://outwestmedia.com/jquery-plugins/xmldom/</a></p>
  
  <p>here's a fiddle: </p>
  
  <p><a href="http://jsfiddle.net/YL8bY/" rel="nofollow">http://jsfiddle.net/YL8bY/</a></p>
  
  <pre><code>&lt;body&gt;
  
  &lt;b&gt;xmlDOM Wrapper&lt;/b&gt;  &lt;br /&gt;
  
  XML fragment:  &lt;br /&gt;
  &lt;div id="xmldomdiv1"&gt;&lt;/div&gt;
  
  HTML fragment:  &lt;br /&gt;
  &lt;div id="xmldomdiv2"&gt;&lt;/div&gt;
  
  
  &lt;b&gt;jQuery Wrapper &lt;/b&gt;  &lt;br /&gt;
  
  XML fragment:  &lt;br /&gt;
  &lt;div id="jqdiv1"&gt;&lt;/div&gt;
  
  HTML fragment:  &lt;br /&gt;
  &lt;div id="jqdiv2"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  
  &lt;script&gt;
  
  var xmlfragment = '&lt;book&gt;&lt;title&gt;My Book Title&lt;/title&gt;&lt;author&gt;Joe Author&lt;/author&gt;&lt;/book&gt;';
  var htmlfragment = '&lt;div&gt;&lt;p&gt;My Book Title&lt;/p&gt;&lt;p&gt;Joe Author&lt;/p&gt;&lt;/div&gt;';
  
  var $xmldomxml = $.xmlDOM( xmlfragment );
  var $xmldomhtml = $.xmlDOM( htmlfragment );
  
  var $jqxml = $( xmlfragment );
  var $jqhtml = $( htmlfragment );
  
  $('#xmldomdiv1').append( $xmldomxml.find('title, author'));
  $('#xmldomdiv2').append( $xmldomhtml.find('p'));
  
  $('#jqdiv1').append( $jqxml.find('title, author'));
  $('#jqdiv2').append( $jqhtml.find('p'));
  
  console.log("Here's fragment vars:  ");
  console.log($xmldomxml);
  console.log($xmldomhtml);
  console.log($jqxml);
  console.log($jqhtml);
  
  &lt;/script&gt;
  </code></pre>