title: Why is setting empty text node in XML not an error?
body: <p>Example input:</p>
  
  <pre><code> &lt;p&gt;    &lt;/p&gt;
  </code></pre>
  
  <p>Example code:</p>
  
  <pre><code> // assume node is the 'p' Element, then chNode is a text node
   chNode = node.getFirstChild(); 
  
   // set text to empty string
   chNode.setNodeValue("");
  </code></pre>
  
  <p>I would have thought setting empty text is an error, or, it would delete the text node.  </p>
  
  <p>Since, we have a <code>p</code> element with an empty text node.  However, if we had deleted the text node instead, would it not be the same thing?  </p>
  
  <p>I'm trying to understand the purpose of the empty text node.</p>