HtmlAgilityPack skip or remove nested table
See the question and my original answer on StackOverflow//
is an XPATH expression that means "scan all nodes and sub nodes". That's why //tr
gets all tr below the root one.
If you just do parentTable.SelectNodes("tr")
(or "./tr"
which is equivalent), you will select all TR below the root one.
If you want to skip the first one, then you can add an XPATH filter on element's position()
(an XPATH function):
var parentTableRows = parentTable.SelectNodes("tr[position() > 1]");