title: XML parser to get result in Name and Value pair in java
body: <p>I need to parse the dynamically generated XML files. So want to parse the xml results in Name and Value pair and will insert in to some Hashmap. So which parsing mechanism is easy and more robust to parse the XML in Name, value pair?</p>
  
  <p>My XML looks like,</p>
  
  <pre><code>&lt;Address&gt;
      &lt;Name&gt;Rahul&lt;/Name&gt;
      &lt;ID&gt;2345&lt;/ID&gt;
      &lt;City&gt;Pune&lt;/City&gt;
      &lt;Street&gt;Gandhi Nagar&lt;/Street&gt;
  &lt;/Address&gt;
  </code></pre>
  
  <p>I need to get the parsing result as,</p>
  
  <pre><code>Name:Rahul
  ID:2345
  City:Pune
  Street:Gandhi Nagar
  </code></pre>