Please read the following table in HTML format from a webpage and then answer the question in detail according to the table. Each table cell is defined by a <td> and a </td> tag. Each table row starts with a <tr> and ends with a </tr> tag. 'rowspan=m' and 'colspan=n' represents a cell spaning over 'm' rows and 'n' columns.

Webpage title:
West Tyrone (UK Parliament constituency)
Table title:
Members of Parliament
Table:
<table id='hittask' contenteditable='False'>
<tr> <th colspan=2 rowspan=1 > Election </th><th colspan=1 rowspan=1 > Member </th><th colspan=1 rowspan=1 > Party </th></tr>
<tr> <td colspan=1 rowspan=1 >  </td><td class="highlighted"  colspan=1 rowspan=1 > 1997 </td><td class="highlighted"  colspan=1 rowspan=1 > William Thompson </td><td class="highlighted"  colspan=1 rowspan=1 > Ulster Unionist </td></tr>
<tr> <td colspan=1 rowspan=1 >  </td><td class="highlighted"  colspan=1 rowspan=1 > 2001 </td><td class="highlighted"  colspan=1 rowspan=1 > Pat Doherty </td><td class="highlighted"  colspan=1 rowspan=1 > Sinn Féin </td></tr>
<tr> <td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > 2017 </td><td colspan=1 rowspan=2 > Barry McElduff </td><td colspan=1 rowspan=1 > Sinn Féin </td></tr>
<tr> <td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > 2018 </td><td colspan=1 rowspan=1 > Independent </td></tr>
<tr> <td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > 2018 by-election </td><td colspan=1 rowspan=1 > Órfhlaith Begley </td><td colspan=1 rowspan=1 > Sinn Féin </td></tr>
</table>
Question:
Who were the MPs from 1997-01 and 2001-17, and what party did each person represent?
Answer:
Between 2001 and 2017, the MP was Pat Doherty of Sinn Féin, and the MP between 1997 and 2001 was William Thompson of the Ulster Unionist Party.