The inner text of any other child node is not searched for by XPath.

c# html html-agility-pack xpath

Question

HtmlAgilityPack is what I'm using.

When I move my cursor over the parent node, several ChildNodes appear.#text nodes. The displayed XPath value/code[1]/#text[1] I endeavor to employ//#text to get every text node, however I keep getting this error:

Error: Expression must evaluate to a node-set.

I tried.//text without receiving anything in return.

1
5
6/28/2012 5:07:05 PM

Accepted Answer

You must usetext() obtaining text nodes. Use to get each document's text nodes to acquire//text() .

specification, from:

text() matches any text node.

5
5/20/2011 9:40:49 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow