The HTML Agility Pack handles HTML in a case-insensitive manner. This means that he will analyze the body, body and body in the same way. This is by design since HTML is not case sensitive (there is XHTML).
However, when you use your XPATH function, you must use lowercase tags. This means that the expression "//body" will match BODY, Body and body, and "// BODY" will not match anything.
source share