Grouping By Key (Data)

Group the following data by country:

<cities>
  <city name="Milano"  country="Italia"/>
  <city name="Paris"   country="France"/>
  <city name="München" country="Deutschland"/>
  <city name="Lyon"    country="France"/>
  <city name="Venezia" country="Italia"/>
</cities>