I'm parsing sth. like eBay (list of products).
It's simple table, some columns has also links.
I'm able to look at table using
Node nodes [] = parser.extractAllNodesThatAre(TableTag.class);
and visiting TableColumn[] and then nodes via getChildrenAsNodeArray()
I can read every text I need, but there is no links at all (because they are not TableTag.class i think).
How should i parse this table to have text _and_ links at once?
It's example of my table, i need to extract: id,name,link and price.
<table name=xx>
<tr>
<th>id</th>
<th>name with link</th>
<th>price</th>
</tr>
<tr>
<td>12243</td>
<td><a href="someadress">name1</a></td>
<td>123$</td>
</tr>
<tr>
<td>1323</td>
<td><a href="someadress2">name2</a></td>
<td>145$</td>
</tr>
</table>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm parsing sth. like eBay (list of products).
It's simple table, some columns has also links.
I'm able to look at table using
Node nodes [] = parser.extractAllNodesThatAre(TableTag.class);
and visiting TableColumn[] and then nodes via getChildrenAsNodeArray()
I can read every text I need, but there is no links at all (because they are not TableTag.class i think).
How should i parse this table to have text _and_ links at once?
It's example of my table, i need to extract: id,name,link and price.
<table name=xx>
<tr>
<th>id</th>
<th>name with link</th>
<th>price</th>
</tr>
<tr>
<td>12243</td>
<td><a href="someadress">name1</a></td>
<td>123$</td>
</tr>
<tr>
<td>1323</td>
<td><a href="someadress2">name2</a></td>
<td>145$</td>
</tr>
</table>
ok, I did it via enumarating
cell.getChildren().searchFor(LinkTag.class, true)
Very nice :)