I have a string which has the data of an html table with rows and column.
Each td has its unique id and values.
Now I need to extract the id with value of that id from that string.
String value:
<table id="tblProducts" width="100%" border="1" style="text-align:center">
<tbody>
<tr>
<td>
<input style="width:100%; text-align:center" id="slNo" maxlength="100" value="1" readonly="">
</td>
<td>
<textarea style="width: 100%; text-align: center" id="Description">TEST</textarea >
</td>
<td>
<textarea style="width: 100%; text-align: center" id="Specification">UU</textarea >
</td>
<td>
<input style="width: 100%; text-align: center" id="HSNCode" value="uuu">
</td>
<td>
<input style="width: 100%; text-align: center" id="Unit" value="ii">
</td>
<td>
<input type="number" style="width: 100%; text-align: center" id="Qty" onchange="calculateValue(this)" value="33">
</td>
<td>
<input type="number" style="width: 100%; text-align: center" id="Rate" onchange="calculateValue(this)" value="33">
</td>
<td>
<input style="width: 100%; text-align: center" id="Value" class="totalTaxableValue" readonly="" value="1089">
</td>
<td>
<button type="button" class="del_product btn btn-link" title="Delete" onclick="deleteRow()">
<span class="fa fa-trash" aria-hidden="true"></span>
</button>
</td>
</tr>
<tr>
<td>
<input style="width:100%; text-align:center" id="slNo_2" maxlength="100" value="2" readonly="">
</td>
<td>
<textarea style="width: 100%; text-align: center" id="Description_2">UU</textarea >
</td>
<td>
<textarea style="width: 100%; text-align: center" id="Specification_2">TEST</textarea >
</td>
<td>
<input style="width: 100%; text-align: center" id="HSNCode_2" value="uu">
</td>
<td>
<input style="width: 100%; text-align: center" id="Unit_2" value="uu">
</td>
<td>
<input type="number" style="width: 100%; text-align: center" id="Qty_2" onchange="calculateValue(this)" value="33">
</td>
<td>
<input type="number" style="width: 100%; text-align: center" id="Rate_2" onchange="calculateValue(this)" value="33">
</td>
<td>
<input style="width: 100%; text-align: center" id="Value_2" class="totalTaxableValue" readonly="" value="1089">
</td>
<td>
<button type="button" class="del_product btn btn-link" title="Delete" onclick="deleteRow()">
<span class="fa fa-trash" aria-hidden="true"></span>
</button>
</td>
</tr>
</tbody></table>
I need to get
id = "slNo" value = "1"
id = "Description" value = "TEST"
Thanks in advance