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;

<body>
    <h1>Test</h1>
    <script>
      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="http://test.com">test</a>test<a href="test.com">test</a>,test <a href="http://test.com">genus</a> <i><b>Apteryx</b></i> test <b>test</b>.test  <a href="http://test.com">test</a>test <a href="http://test.com">egg</a> test.</definition>\n' +
'    </sense>\n' +

'';
    </script>

    <script>
  
    </script>
  </body>

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)?