I'm trying to parse this field, but can't get it to work. Current attempt:
var name = doc.DocumentNode.SelectSingleNode("//*[@id='my_name']").InnerHtml; <h1 class="bla" id="my_name">namehere</h1>
Error: Object reference not set to an instance of an object.
Appreciate any help.
@John - I can assure that the HTML is correctly loaded. I am trying to read my facebook name for learning purposes. Here is a screenshot from the Firebug plugin. The version i am using is 1.4.0.
I guess the problem is that profile_name is a child node or something, that's why I'm not able to read it?
I was able to get my own name using the following selector:
string name = doc.DocumentNode.SelectSingleNode("//a[@id='navAccountName']").InnerText;