I'm using HtmlAgilityPack.
I hover over the parent node and its ChildNodes show several
#text nodes. The XPath value shows
/code/#text. I try to use
//#text to get all the text nodes but I get that error:
Expression must evaluate to a node-set.
//text and get nothing, but no error.
You need to use
text() to get text nodes. To get all text nodes in the document, use
From the specification:
text()matches any text node.