0

I have Html table and I want to convert it to java array. Table looks like this:

<html>
<body>
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
</body>
</html>

I want to It looked like this in java:

num[1] = row 1, cell 1

num[2] = row 1, cell 2

num[3] = row 2, cell 1

num[4] = row 2, cell 2

How?

3
  • Please format your code properly. Commented Feb 23, 2013 at 20:35
  • 5
    Have a look at stackoverflow.com/questions/11967874/… Commented Feb 23, 2013 at 20:37
  • Will it work with that format: <html> <body> <table border="1"> <tr align= "center"> <td align="char">TD1</td> <td>td1</td> <td align="char">TD1</td> <td>td1</td> </tr> <tr> <td>TD2</td> <td>tD2</td> <td class="bold>Td2</td> <td>td2</td> </tr> </table> </body> </html> Commented Feb 23, 2013 at 21:45

0