Quote:
var node = doc.DocumentNode.SelectSingleNode("\\div class");
The SelectSingleNode method[
^] expects an XPath expression. The string
\div class
is not an XPath expression.
XPath Tutorial[
^]
If you want to select all
<div>
elements which have a
class
attribute, use:
var node = doc.DocumentNode.SelectSingleNode("//div[@class]");