Parsing multiple html table with different structure to a dataset
<p>I used the following code to parse multiple html table from a saved web page to a datatable (the table must have the same structure) (using Html-Agility-Pack):</p>

<pre><code>    Imports System.Net

    Public Sub ParseHtmlTable(byval HtmlFilePath as String)

    Dim webStream As Stream
    Dim webResponse = ""
    Dim req As FileWebRequest
    Dim res As FileWebResponse

    req = WebRequest.Create("file:///" &amp; HtmlFilePath)

    req.Method = "GET" ' Method of sending HTTP Request(GET/POST)

    res = req.GetResponse ' Send Request

    webStream = res.GetResponseStream() ' Get Response

    Dim webStreamReader As New StreamReader(webStream)

    Dim htmldoc As New HtmlAgilityPack.HtmlDocument
    htmldoc.LoadHtml(webStreamReader.ReadToEnd())

    Dim nodes As HtmlAgilityPack.HtmlNodeCollection = htmldoc.DocumentNode.SelectNodes("//table/tr")

    Dim dtTable As New DataTable("Table1")

    Dim Headers As List(Of String) = nodes(0).Elements("th").Select(Function(x) x.InnerText.Trim).ToList

    For Each Hr In Headers

        dtTable.Columns.Add(Hr)

    Next

    For Each node As HtmlAgilityPack.HtmlNode In nodes

        Dim Row = node.Elements("td").Select(Function(x) x.InnerText.Trim).ToArray

        dtTable.Rows.Add(Row)

    Next

    dtTable.WriteXml("G:\1.xml", XmlWriteMode.WriteSchema)

    End Sub
</code></pre>

<p>but i cannot parse multiple html table having different structure to a dataset(multiple table) like this <a href="https://en.wikipedia.org/wiki/ISO_4217" rel="nofollow">Page</a> any suggestions??</p>