Get all nodes in a document using HtmlAgilityPack.

c# html-agility-pack xpath

Question

i would like to traverse all nodes in a documnet using HtmlAgilityPack will

foreach (HtmlNode node in myhtml.DocumentNode.SelectNodes("//@"))

do?

1
11
2/2/2012 3:32:35 PM

Popular Answer

You can just loop through myhtml.DocumentNode.Descendants().

20
2/2/2012 3:25:05 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow