i wrote an app that take values from a table and manipulat them, my problem is that there is 2 tables before the table i want(without id,class) . i want to skip them and go to the third table . my code:
HtmlNodeCollection tables = doc.DocumentNode.SelectNodes("//table");
HtmlNodeCollection rows = tables[2].SelectNodes(".//tr");
foreach (HtmlNode item in rows)
{
/// my code//
}
i thought the code: table[2] means go to the third table but infact it mean take 3 tables, is there a way to define spacific table or from to tables? (without id or class name in the table)
i think the below code will help you on this…
"//table[3]": it defines the 3rd table