title: XML Node and Child Nodes
body: <pre><code>header = new LinkedHashMap&lt;String,Object&gt;();
  Element headerElement = (Element)doc.getElementsByTagName( "Header").item(0);
  NodeList elementList = headerElement.getElementsByTagName( "*" );
  for( int index =0; index &lt; elementList.getLength(); index++ ){
      Node element = elementList.item(index);
      System.out.println( element.getChildNodes().item(0).getTextContent() ); // Statement A          
      System.out.println( element.getTextContent()); // Statement B
  </code></pre>
  
  <p>Both Statement A and Statement B are printing the same output.</p>
  
  <p>What does it means, every node is a child node for itself??</p>
  
  <p>And the input XML is</p>
  
  <pre><code>&lt;Header&gt;
      &lt;tag1&gt;1&lt;/tag1&gt;
      &lt;tag2&gt;2&lt;/tag2&gt;
      &lt;tag3&gt;3&lt;/tag3&gt;
      &lt;tag4&gt;4&lt;/tag4&gt;
  &lt;/Header&gt;
  </code></pre>