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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -