This project has moved and is read-only. For the latest updates, please go here.

XPath problem

Sep 21, 2010 at 8:46 PM

Hello, I have problem when using XPath to select dynamically created nodes. See comments in example:

var head = doc.DocumentNode.SelectSingleNode("//head") as HtmlNode;
HtmlNode node = new HtmlNode(HtmlNodeType.Element, doc, 1);
node.Name = "meta";
node.Attributes.Add("http-equiv", "content-type");
node.Attributes.Add("content", "text/html; charset=iso-8859-1");

//couldn't find node here
var meta = head.SelectNodes("//meta");

//after reloading document, it works fine
var meta2 = head.SelectNodes("//meta");

Can I (we) expect this to be fixed? I used 1.4 version in demo, because I had some problems to load 1.9, but in my app I'm using 1.9 version, and results are same.