title: To get count of values with respective attribute values in XML using java
body: <p>I have an xml file like:</p>
  
  <pre><code>&lt;cars&gt;
      &lt;model&gt;maruthi&lt;/model&gt;
      &lt;version&gt;alto&lt;/version&gt;
  &lt;/cars&gt;
  &lt;cars&gt;
      &lt;model&gt;maruthi&lt;/model&gt;
      &lt;version&gt;verna&lt;/version&gt;
  &lt;/cars&gt;
  &lt;cars&gt;
      &lt;model&gt;maruthi&lt;/model&gt;
      &lt;version&gt;alto&lt;/version&gt;
  &lt;/cars&gt;
  </code></pre>
  
  <p>I need java program where it can read the file and provide out put like,    </p>
  
  <pre><code>            model/ccar      Alto  verna
              Maruthi           2      1
  </code></pre>
  
  <p>(like Model and count verion for that model..)</p>
  
  <p>Can any one help on this?</p>