3

I have this html. I want to get list of node using html agility pack.

<span prop="name">Richard Winchester</span>
<span prop="company">Kodak</span>
<span prop="street">Arlington Road 1</span>

I tried this

Dim doc = New HtmlAgilityPack.HtmlDocument()
doc.LoadHtml(AboveHtmlInString)
Dim nodes = doc.DocumentNode.ChildNodes

But I am not getting collection of nodes.

1
  • Do you get an error? You will need to provide more of your code as the code you provided would appear to work. Commented Oct 28, 2015 at 12:14

1 Answer 1

2

Your above code should work. I have made an identical representation in C# and it compiles and works as intended. It might be a visual basic issue.

HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(AboveHtmlString);
HtmlNodeCollection nodes = doc.DocumentNode.ChildNodes;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.