Selecting Input elements

Jun 27, 2009 at 1:42 AM

Maybe I'm still too novice to XPath to figure this out, but I'm having trouble.  Not sure if this is a bug or what.


I have a webpage I want to parse through that has two forms on it.  I want to be able to use HtmlAgilityPack to select all the inputs, selects, etc for each form in my app.

When I do SelectNodes("//form[1]/input") I get a null.

Also, if I do SelectNodes("//form[1]") I get a Collection of my two forms.


Subsequently,  I commented out the Empty flag for the form element, but it didn't help.