title: IE8 appendChild to XML issue: Type Mismatch
body: <p>I am working on an xml using jquery and javascript. I import xml using ajax then i want to manipulate it, appendChild is a problem in IE8.</p>
  
  <p>This is the Javascript:</p>
  
  <pre><code>// How i get xml 
  $.ajax({
    url: production_get,
    dataType: "xml",
    success: function(data) {
        input_xml=data;
    }
  });
  
  // how i try to append a new node to 
  
  new_user_node = document.createElement('user');
  new_user_node.setAttribute('id',new_user_id);
  new_user_node.setAttribute('label',new_user_label);        
  
  response=$(input_xml)[0].getElementsByTagName("response")[0];
  response.appendChild(new_user_node); // &lt;- type mismatch
  </code></pre>
  
  <p>XML markup</p>
  
  <pre><code>&lt;response&gt;
      &lt;user id="123" label="John" /&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>This works great in all browser but IE that reports: Type Mismatch. I have to say it works even in IE8 but console reports the error, while in IE7 the error popup appears</p>