title: Difference between Element node and Text Node
body: <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE people SYSTEM "validator.dtd"&gt;
  
  &lt;people&gt;
      &lt;student&gt;
          &lt;name&gt;John&lt;/name&gt;
          &lt;course&gt;Computer Technology&lt;/course&gt;
          &lt;semester&gt;6&lt;/semester&gt;
          &lt;scheme&gt;E&lt;/scheme&gt;
      &lt;/student&gt;
  
      &lt;student&gt;
          &lt;name&gt;Foo&lt;/name&gt;
          &lt;course&gt;Industrial Electronics&lt;/course&gt;
          &lt;semester&gt;6&lt;/semester&gt;
          &lt;scheme&gt;E&lt;/scheme&gt;
      &lt;/student&gt;
  &lt;/people&gt;  
  </code></pre>
  
  <p>In simple XML language <code>&lt;open-tag&gt; data &lt;/open-tag&gt;</code> is an element.<br>
  As per my XML above, <code>&lt;student&gt; ... &lt;/student&gt;</code> is an element and so are the other tags.  </p>
  
  <p>In DOM parsing, there is an <code>Element</code> node and a <code>Text</code> node. Referring to the book I am using, <code>&lt;student&gt;</code> is an <code>Element</code> node and <code>&lt;name&gt;</code>, <code>&lt;course&gt;</code> and the other nested tags are <code>Text</code> nodes.  </p>
  
  <p>So, if I am understanding DOM properly, all the outer tags are <code>Elements</code> and the tags that contain the actual data are <code>Text</code> nodes ?</p>