Determine the htmlnode name/type (eg li)

c# dom html-agility-pack

Question

How can one determine whether theHtmlNode I'm collaborating with an<li> ? Knowing theNodeType is anElement but, how can you tell whether it is an error?<li>

If you need any other information, please let me know.

1
8
3/28/2014 3:51:08 PM

Accepted Answer

You may do this check by using theName property:

if( node.Name == "li" )
19
3/28/2014 3:48:11 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