trying but failing to parse html table

Aug 9, 2008 at 11:30 PM
Hi there, i am using vb.net 2005 and have added an htmlagilitypack.dll reference

With help from other posts i have got so far with this sample

-Created a sample file with the following taken from another thread:

<BODY>
<TABLE>
<TR>
<TD>Row 0, Col 0</TD>
<TD>Row 0, Col 1</TD>
</TR>
<TR>
<TD>Row 1, Col 0</TD>
<TD>Row 1, Col 1<TD>
</TR>
</TABLE>
</BODY>

now in vb.net i have:

 

Dim web As New HtmlAgilityPack.HtmlWeb
Dim doc1 As New HtmlAgilityPack.HtmlDocument

 

doc1 = web.Load(

"...path..\samplefile.htm")
Dim tables As HtmlAgilityPack.HtmlNodeCollection
tables = doc1.DocumentNode.SelectNodes("//TABLE")
or

it always returns nothing. the htmlnodecollection is always nothing. Please, what am i doing wrong

Thanks

 

 

 





Oct 2, 2008 at 1:46 AM
Hello!

I resolve this problem, but tag "TD" dont inner tag in tag "TD"...
How resolve thi problem?

HtmlNode.cs, LIne 604
Insert code:
if (_innerlength < _innerstartindex)
{
       return string.Empty;
}

Good luck! (Sorry for my english...)