title: Create html table header from xml file in Java
body: <p>I need some light here on this problem I'm trying to solve:</p>
  
  <p>I want to create an html table from a xml file and I'd like
  to create a table header according to the elements in the xml
  file as follows:</p>
  
  <pre><code>&lt;xml&gt;
    &lt;fields&gt;
      &lt;field&gt;
        &lt;name&gt;A&lt;/name&gt;
      &lt;/field&gt;
      &lt;merge label="D"&gt;
        &lt;field&gt;
          &lt;name&gt;B&lt;/name&gt;
        &lt;/field&gt;
        &lt;field&gt;
          &lt;name&gt;C&lt;/name&gt;
        &lt;/field&gt;
      &lt;/merge&gt;
    &lt;/fields&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>Should generate a table header like this:</p>
  
  <pre><code>/========================\    \
  |           |     D      |     |
  |     A     |------------|     |- table header
  |           |   B  |  C  |     |
  |========================|    /
  |   .....   |  ..  | ... |
  \========================/  
  </code></pre>
  
  <p>Any ideas in how to do this using Java?</p>