title: Converting simple XML line into a Map elegantly
body: <p>I'm doing some work with the stackoverflow data set in Java and have a string like this:</p>
  
  <pre><code> &lt;row Id="1" PostId="35314" Score="8" Text="not sure why this is getting
       downvoted -- it is correct! Double check it in your compiler if you
       don't believe him!" CreationDate="2008-09-06T08:07:10.730" UserId="1" /&gt;
  </code></pre>
  
  <p>(newlines added for readability)</p>
  
  <p>Assuming the data above is in a String, what would be the most elegant way to convert it into a <code>Map&lt;String, String&gt;</code>, with the keys being the labels (<code>"Id"</code>, <code>"Score"</code>, ...) and the values being Strings containing the values (<code>"1"</code>, <code>"35314"</code>, ...)?  I want to do this elegantly, readably, and succinctly because is this code will be seen by a lot of people. I wrote something up that does all kinds of string manipulation and it's just ugly.</p>
  
  <p>In the framework I am using, I have to process one row at a time, so I can't parse the entire XML structure (all the lines) at once. I have to do one line at a time.</p>