I’m writing a small vb application to extract some text using Html Agility Pack.
I need to extract some on tags from the html and not the text nodes.
iParagraph is a collection of nodes containing tags like: strike, u, strong, b, etc. It also contains text nodes. I just needed to skip the first text node because I always know that it will be empty. This is because I’m using CKEditor.
If you need further explanation please ask. I will clarify.
Below is a sample of what I’m trying:
Dim paragraph = iParagraphNode.SelectNodes("//body/p and not([contains(text()]))")
The solution is good enough for now:
I just decided to do the following to skip the next node: