c# - htmlagilitypack getting an element's node by the name -


how can node of element name. there getelementbyid, why no getelementbyname. element in question is:

   <select class="box1" name="day" tabindex="31"> … </select> 

i want able node. have no idea how.

pete: please remove question has been answered. totally wrong go try yourself. node.name not name of attribute 'name' tagname not need.

you not accessing node attribute called "name" of "select" tags in descendants. using property name of tag (xe.name). correct approach can :

document.documentnode.descendants("select").where(node => node.getattributevalue("name", "").equals("day", stringcomparison.invariantcultureignorecase)); 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -