html - HtmlAgilityPack reading table after specified table -
i have similiar structure this:
<table class="superclass"> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> <table cellspacing="0"> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> this how first table class:
htmlnode firsttable = document.documentnode.selectsinglenode("//table[@class=\"superclass\"]"); then read data. don't know how straight table , read data too. ideas?
i'd rather avoid counting table , using index table.
there xpath following-sibling axis allows element following current context element @ same level :
htmlnode firsttable = document.documentnode.selectsinglenode("//table[@class=\"superclass\"]"); htmlnode nexttable = firsttable.selectsinglenode("following-sibling::table");
Comments
Post a Comment