title: max number of child nodes navigable with xPath in htm lAgility pack
body: <p>I am using HTML agility pack to remove bad html in database entries. I am trying to delete the nodes by using <code>SelectSingleNode(xpath).Remove();</code>. this is throwing an error</p>
  
  <blockquote>
    <p>System.Xml.XPath.XPathException: 'The xpath query is too complex.</p>
  </blockquote>
  
  <p>is there a maximum number of nodes you can navigate through when using xPath, or is there another reason this error is occuring? I reduced the number of nodes in a test and xPath worked okay, below is the xpath that is throwing this exception. (it is messy)</p>
  
  <hr>
  
  <pre><code>/p[1]/span[1]/span[1]/strong[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/strong[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/strong[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/strong[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/span[1]/b[1]/span[1]/b[1]/b[1]/span[1]/b[1]/b[1]
  </code></pre>
  
  <hr>
  
  <hr>
  
  <p><strong><em>Note:</em></strong> The reason for wanting to do this is because I am on placement bug fixing. there is html entries stored in the db that got stuffed with unwanted html due to a rad editor bug that was left unnoticed until it broke the rad editor when loading reports. I need to keep the styling which is stored in html tags so I can't delete all the HTML.</p>