This project has moved. For the latest updates, please go here.

No innertext on retrieved node

May 18, 2010 at 2:19 PM

I'm retrieving the <option> items of a <select> and the XPath expression for this works as expected. However, the <option> nodes which I get back do not have the innertext property set, but they do contain the correct 'value' attribute.

The XPath expression I use:

HtmlNodeCollection nodes = doc.DocumentNode.SelectNodes( "//div[@name='locations']//select/option" );

Anyone have an idea why the innertext is empty?