title: Difference between setTextContent() and appendChild(Text)
body: <p>When creating a XML document what is the difference (if there is any) between these two methods of adding text to an element:</p>
  
  <pre><code>Element el = document.createElement("element");
  el.setTextContent("This is the text content");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Element el = document.createElement("element");
  Text txt = document.createTextNode("This is the text content");
  el.appendChild(txt);
  </code></pre>