title: How to use XML Parser and get element by tagName when tag contains embedded element inside?
body: <p>I'm using XMLParser to get data from a tag.</p>
  
  <p>This tag is like this :</p>
  
  <pre><code>&lt;tagName elem="XXX"&gt;&lt;/tagName&gt;
  </code></pre>
  
  <p>I want to get : <code>XXX</code></p>
  
  <p>According to documentation, I'm doing like :</p>
  
  <pre><code>    parseMyXML = new DOMParser();
      xmlDoc = parseMyXML.parseFromString(contentXML,"text/xml");
  
      var code_XXX = xmlDoc.getElementsByTagName("tagName")[0].childNodes[0].nodeValue;
  </code></pre>
  
  <p>I have an error : <code>Uncaught (in promise) TypeError: Cannot read property 'nodeValue' of undefined</code></p>
  
  <p>What I need is to go into <code>tagName</code> and to get the contain of <code>elem</code></p>