0

I used htmlunit to get htmltable rows.But I cannot set them to mysql database. My database has columns like the htmltable.How can i save current row to my database?? Can anybody help me? Here is my code:

final HtmlTable table = HtmlTable)currentPage.getByXPath("//table[@role='grid']").get(0);
int i = 0;
for(final HtmlTableRow row : table.getRows()){
System.out.println(row.asText());
rows[i] = row.toString();
i++;
}
Caner
  • 43
  • 1
  • 7
  • 1
    Why you "cannot set them to mysql database"? – Jiri Tousek Dec 01 '15 at 09:41
  • All the data try to save the same cell. Htmltable has 4 column like Id,Year,Brand,Color. I want to get them with htmlunit and save them like Id,Year,Brand,Color to database. But when i get data from website, it come 'Id Year Brand Color c80119ce 1990 Ford Brown like tahat.How can i save to cells. – Caner Dec 01 '15 at 12:21

0 Answers0