visual studio 2010 - Confusing sequence of code -
i attempting use html agility pack parsing on webpages. here line of code came across in example.
var div = document.documentnode.descendants().where(n => n.name == "div") the tooltip says "(parameter) htmlnode n" when placed on n in visual studio
i uncertain n , line does
this code selects descendants of root node of document tag name == "div"
- document.documentnode selects root node
- .descendants() selects nodes in root node (not direct children all)
- .where() selects meets criteria
- n => n.name == "div" criteria means "if n node criteria true when node's name equal "div"
Comments
Post a Comment