Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HtmlAgilityPack - get all nodes in a document

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

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

do?

like image 755
kiki Avatar asked Feb 02 '12 15:02

kiki


1 Answers

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

like image 96
SLaks Avatar answered Sep 21 '22 14:09

SLaks