I have a document with a bunch of posts. I select them all like so:
HtmlNodeCollection posts = doc.DocumentNode.SelectNodes("//div[@class='forum_post']");
Then I iterator over them:
foreach (HtmlNode post in posts)
So far so good, but then, I want to select a node WITHIN a single post.
string content = post.SelectSingleNode("//div[@class='post_content']").InnerText.Trim();
Instead of retrieving the post_content from within the current forum_post, instead I get the first post_content div in the entire document.
Please let me know if I am doing something wrong, or this is a bug.