Now i want to take that inner table which has tabid='maintable' and i want those values which are in td tags.. How can i do that?? Any help appreciated..
Thanks in advance
-Pandu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can retrieve the table you want with a filter like:
NodeList list = parser.Parse (
new AndFilter (
new TagNameFilter ("TABLE"),
new HasAttributeFilter ("tabid", "maintable")));
Then cast each node in the list to a TableTag and use the TableTag accessors to get the rows (TableRow[] getRows ()) and from the rows get the columns (TableColumn[] getColumns ()).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Everybody,
I want to parse a html file which is like this
<html>
<head>
</head>
<body>
<table>
<table tabid='a'>
<table tabid='maintable'>
<tr>
<td>111
</td>
<td>abc
</td>
<td>123
</td>
</tr>
I want to parse a html file which is like this
<html>
<head>
</head>
<body>
<table>
<table tabid='a'>
<table tabid='maintable'>
<tr>
<td>111
</td>
<td>abc
</td>
<td>123
</td>
</tr>
</table>
</table>
<table>
</table>
<table>
</table>
</table>
</body>
</html>
Now i want to take that inner table which has tabid='maintable' and i want those values which are in td tags.. How can i do that?? Any help appreciated..
Thanks in advance
-Pandu
You can retrieve the table you want with a filter like:
NodeList list = parser.Parse (
new AndFilter (
new TagNameFilter ("TABLE"),
new HasAttributeFilter ("tabid", "maintable")));
Then cast each node in the list to a TableTag and use the TableTag accessors to get the rows (TableRow[] getRows ()) and from the rows get the columns (TableColumn[] getColumns ()).
Thanks for your help.. You saved my time