Determine the htmlnode name/type (eg li)

c# dom html-agility-pack

Question

How does one know if the HtmlNode I'm working with is an <li>? I know the NodeType is an Element but how do you determine if that is an <li>

Let me know if there's any more information you need.

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

Accepted Answer

You can check it like this, just use the Name 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