I figure I need a //text() and then a 'not' to ignore any tag within the branch that has a
<script> in it.
I have tried
but neither work. An example of the XPath property of a node that they return is (notice the Script)
I have consulted with both of these posts.
Grab all text from html with Html Agility Pack (This is a good post but it brings out the JS)
Your first attempt rejects all text nodes that are script elements, and your second rejects all text nodes that have script node children. Of course, in both cases, the condition is never true.
You haven't explained your requirements clearly, but I guess you want to reject all text nodes that have script elements as their parent, which would be