title: I want the original case-sensitve tagName in XML element.
body: <p>The following code returns UpperCase text of the tagName. I want the original case.</p>
  
  <pre><code>var xml = '&lt;myElements type="AA" coID="A923"&gt;&lt;myHouse&gt;01&lt;/myHouse&gt; &lt;myCars&gt;02&lt;/myCars&gt;&lt;myWifeAndDog&gt;03&lt;/myWifeAndDog&gt;&lt;/myElements&gt;';
  
  $(xml).children().each(function () {
      var xmlnode = $(this);
      console.log(this.tagName + " - " + xmlnode.text());
  });
  </code></pre>
  
  <p>Returns: </p>
  
  <pre><code>MYHOUSE - 01
  MYCARS - 02
  MYWIFEANDDOG - 03
  </code></pre>
  
  <p><strong>I want it to return:</strong></p>
  
  <pre><code>myHouse - 01
  myCars- 02
  myWifeAndDog- 03
  </code></pre>
  
  <p><strong>How can i do this?</strong></p>
  
  <p><strong>SOLVED:</strong> Using DOM as Mike suggested. Not sure if this is supported by ALL browsers though.</p>
  
  <pre><code>var xmlDoc;
  if (window.DOMParser) {
      parser = new DOMParser();
      xmlDoc = parser.parseFromString(data.xmltext, "text/xml");
  }
  else // Internet Explorer
  {
      xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
      xmlDoc.async = "false";
      xmlDoc.loadXML(data.xmltext);
  }
  console.log(xmlDoc);
  console.log(xmlDoc.firstChild.children[0].tagName);
  </code></pre>