Under the Chrome Browser, I have Exported the Html from one Bookmarks-bar folder containing 4 subfolders (each with its respective Html h3 heading names). Then, in the exported Html code itself, I want to skip over the first 2 cosmetic (not relevant) h3 headings, and then work on the remaining third, fourth, fifth and sixth parent h3 headings, each containing 20+ //a[@href] links respectively.
I know in advance that the third h3 text says "Locomotive Train Engine By Number". So, I want to extract its node and text first. I tried both of these and they failed:
Dim node3LocomotiveByNumber As HtmlNode = DPL_Bookmark_Html.DocumentNode.SelectSingleNode("//h3[3])")
node3LocomotiveByNumber = DPL_Bookmark_Html.DocumentNode.SelectSingleNode("//h3[3]/text()")
writeNGDTextOut.WriteLine(node3LocomotiveByNumber.InnerText)
Over the course of two whole days, I found 3-4 total simplistic "//h3" examples. But NONE included the [3] index. Painfully, I need your help. What could be wrong? I'm out of ideas.
Continuing, I have tried and used this code for links:
For Each eaLink As HtmlNode In DPL_Bookmark_Html.DocumentNode.SelectNodes("//a[@href]")
If so, once I can get the simple SelectSingleNode h3-text code to work, I can then use each of these four loops like this, right?
For Each eaLink As HtmlNode In DPL_Bookmark_Html.DocumentNode.SelectNodes("//h3[3]/a[@href]")
For Each eaLink As HtmlNode In DPL_Bookmark_Html.DocumentNode.SelectNodes("//h3[4]/a[@href]")
For Each eaLink As HtmlNode In DPL_Bookmark_Html.DocumentNode.SelectNodes("//h3[5]/a[@href]")
For Each eaLink As HtmlNode In DPL_Bookmark_Html.DocumentNode.SelectNodes("//h3[6]/a[@href]")
Am I close? In the absense of a strong example, I'm stumped.