Convert xml string to table

I am doing some test to convert xml string to html table, but not sure how to get started. here is the xml.

The table should have 4 columns id, Gender, country, address;

      var attrs = ["id", "Gender", "country", "address"];
      var xmlString =
'<message>\n' +
'  <senses>\n' +
'    <sense id="GFDT987" gender="female" country="countryname" address="60 test street" >\n' +
'      <definition><b>test</b> are <a href="">test</a>test<a href="">test</a>,test <a href="">genus</a> <i><b>Apteryx</b></i> test <b>test</b>.test  <a href="">test</a>test <a href="">egg</a> test.</definition>\n' +
'    </sense>\n' +



The first thing you would have to do is parse the string of xml. Are you building this in the browser or server-side (NodeJS)?