title: System.Xml.XPath.XPathException: 'Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.'
body: <p>Yesterday I posted this question :</p>
  
  <pre><code>https://stackoverflow.com/questions/56182368/html-agility-pack-select-node-after-particular-paragraph
  </code></pre>
  
  <p>I resolved using the solution : <code>htmlSnippet.DocumentNode.SelectNodes('//p[text()="targetWord"]/following-sibling::ul[1]//li')</code></p>
  
  <p>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?</p>
  
  <p><code>System.Xml.XPath.XPathException: 'Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.</code>'</p>
  
  <p>Code that throws the exception:</p>
  
  <pre><code>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");
  </code></pre>