I am trying to parse a PHP page which contain many tables. Now when I try to select those tables, the collection return null?
Dim web As New HtmlAgilityPack.HtmlWeb()
Dim htmlDoc As HtmlAgilityPack.HtmlDocument = web.Load("URL")
Dim html As String
Dim tabletag As HtmlNodeCollection = htmlDoc.DocumentNode.SelectNodes("//table")
Dim tableNode As HtmlNode = htmlDoc.DocumentNode.SelectSingleNode("//table[@summary='List of services']")
If Not tabletag Is Nothing Then
html = tableNode.InnerText
End If
This page certainly has some tables, Just dont understand why it returns null for it?
I loaded your URL up in a browser and viewed the source and there actually aren’t any tables that I could find. Wrong URL?