Yesterday I posted this question :
https://stackoverflow.com/questions/56182368/html-agility-pack-select-node-after-particular-paragraph
I resolved using the solution : htmlSnippet.DocumentNode.SelectNodes('//p[text()="targetWord"]/following-sibling::ul[1]//li')
Today on another project with same identical configuratione and HTML agility pack version I obtain the error message in title. What can I do to solve it?
System.Xml.XPath.XPathException: 'Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
'
Code that throws the exception:
var htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(htmlText);
//var ulCollection = htmlDoc.DocumentNode.SelectNodes("//ul");
var tasksNodesCollection = htmlDoc.DocumentNode.SelectNodes("//p[TextValue()=\"Paragraph:\"]/following-sibling::ul[1]//li");